[Mod] Creatures [git] [minetest_mods_creatures]

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

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Sat May 23, 2015 03:39

MirceaKitsune wrote: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.

Isolate it insofar as that part of your code ought to enable mobs from *other* mods to act in a similar way. It's something I'd love to have for the traders in my villages :-)

MirceaKitsune wrote: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!

That, too, is very fine and would be great for mobs in general.
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 May 23, 2015 10:15

Sokomine wrote:Isolate it insofar as that part of your code ought to enable mobs from *other* mods to act in a similar way. It's something I'd love to have for the traders in my villages :-)


Don't think that one's possible, sorry. Mobs simply choose targets from creatures and nodes around them, and carry out the task with the biggest priority.

But this should allow making villagers behave in enough detail. Also note that you can, of course, define multiple human creatures based on any criteria, using the same model and possibly other settings. So you can use the existing options to make normal villagers wonder around a lot, but traders to normally just sit in place and such.
 

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 23, 2015 21:04

Tweaked the skins and colors for better looking results. Humans now have 3 different skin colors: Black (african), white (caucasian), yellow (asian). Obviously all are combined with random clothes and every outfit is possible.

+ Spoiler


Light damage also got fixed up: You can now define the exact light level at which mobs take damage. If you use a negative value, the effect is reversed... meaning creatures can now take damage when it's darker than the given amount instead, and require light to stay unharmed.
 

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 24, 2015 14:37

Yesterday I discussed the mod on IRC, and performance was brought up. Although mobs in this mod are pretty lightweight, too many mobs will still increase CPU usage visibly. I decided to see if I could improve performance further, and realized I had missed an important optimization.

The problem was that both movement and target selection were preformed based on a single timer, which was typically between 0.25 and 1 seconds per mob. Movement is pretty cheap to calculate, but target scanning is rather expensive. The value had to be set low for movement to work properly, but still high to avoid the heavy target loop.

So now the two are executed separately; Movement and other AI essentials are handled by a new "think" setting, which defaults to around 0.5. Target selection is instead controlled by the "intelligence" trait (now called decision_interval), which typically ranges from 1 to 4 seconds. This means that mobs follow their target with quick and responsive movement, but will decide whether to change this target much more slowly.

The improvement is great: Previously, having 12 active human mobs caused Minetest to use around 14% CPU. Now however, Minetest uses about 8% CPU with 12 human mobs. Without active mobs, Minetest uses around 4%. My CPU is an Intel Core i7 920 (4 cores, 8 threads) clocked to 3.0 GHz. The only downside is that monsters take longer to attack you, but since movement is what the player sees perceived performance is mostly unaffected.

Notice: You absolutely must do a /clearobjects or start a new world after this commit! Old mobs will crash the server.
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Sun May 24, 2015 17:19

MirceaKitsune wrote:The improvement is great: Previously, having 12 active human mobs caused Minetest to use around 14% CPU. Now however, Minetest uses about 8% CPU with 12 human mobs.

That's very good to hear! Mobs really don't need to think about changing target so often. I wonder how the Lord of the Test mobs do it. They occour in pretty high amounts, interact with each other - and still the server is responsive to a degree.
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 » Sun May 24, 2015 18:29

Sokomine wrote:That's very good to hear! Mobs really don't need to think about changing target so often. I wonder how the Lord of the Test mobs do it. They occour in pretty high amounts, interact with each other - and still the server is responsive to a degree.


FYI: My calculations weren't fully correct. I was looking at the CPU usage of Minetest in singleplayer, which is apparently also affected by what is being rendered. I tested again both with and without active mobs, but this time looking down into the ground each time. I estimate that 10 human mobs increase CPU usage with at most 2%, which is even better than what I first thought!
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by TenPlus1 » Mon May 25, 2015 07:37

When testing mobs I find it easier to create a sandstone platform 100 high which lets you test speed and other settings without world abm's interfering around you...
 

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

Re: [Mod] Creatures [minetest_mods_creatures]

by Sokomine » Mon May 25, 2015 16:52

TenPlus1 wrote:When testing mobs I find it easier to create a sandstone platform 100 high which lets you test speed and other settings without world abm's interfering around you...

My skyplatform could then be of use to you. It also has a border around which prevents mobs from hopping to their death.
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 [git] [minetest_mods_creatures]

by MirceaKitsune » Sat Jun 20, 2015 18:16

I made two changes of interest to the mod today. First off, I created a new spawn function which allows mods to spawn any mob at any location. This was already possible using minetest.env:add_entity(pos, name), but more complicated and less officially supported. The change was done to support integration with the Structures mod.

The second important change is that anthros may how have outfits! The same cloth textures as humans are used, so the change was pretty much a single line of code. Clothes are also now optional for both humans and anthros. And calm down, humans aren't butt naked... they already used a separate fabric texture for color, so this just adds a new simplistic outfit. 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 [git] [minetest_mods_creatures]

by MirceaKitsune » Mon Jun 22, 2015 00:37

Today I started working on the first default module distributed in the creatures modpack. As you might remember, modules are separate mods meant to run on top of Creatures, intended to add new functionality for players and mobs.

The upcoming module is called items, and it will be an optional interface which handles special interactions between mobs / players and items in inventories. The first feature, which is currently in the process of being implemented, are 3D wielded items. Not only for the wielded item itself, which is of course visible in the right hand, but the first X items in creature's inventory are also visible on the person's belt! The number of slots and item's position are customizable per creature, meaning you can make anyone have a given number of items from their inventory attached to their body as you see fit.

Latest GIT contains the implementation for players. The mob component should be in tomorrow, which will allow mobs to have random inventories given at spawn time and the first 4 items hanging from their belt. It shall also eventually have logics to teach mobs how to use items. I'm additionally considering implementing pickpocketing support, since the entities used to represent items should be possible to select and right-click... but that will be at a later stage. Screenshots:

Image
Image
Image
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Mon Jun 22, 2015 21:55

Today has been a crazy day for this mod and the new items module. Here is the full list of new features that got added:

- The old drop system was removed and mobs were finally given actual inventories. Since Lua entities can't have real inventories, they are stored in a table but still as item stacks. For example: If you want to get the first item in a mob's inventory, you simply do self.inventory[1]:get_name(). Additionally, a player will get a mob's inventory upon possessing it. By default, mobs will spawn with random tools and materials on them.

- Mobs now also have a (virtual) wield item. By default it is set to 1 and there are no logics to change which item is selected, but mods can do so by setting self.inventory_wield index to any entry in the inventory.

- When punching someone while wielding an item, mobs will now deal the damage of that item! This means that if a mob is holding a sword, it will do the damage specified in the sword's tool capabilities. If the mob is wielding no item, it will do the damage specified in its creature settings like until now.

- Wielded items in the items module have been fully implemented and bug fixed. Mobs now have the items in their inventory showing in their hand and on their belt, with the new wielded item feature being respected and working the same way as for players. I also fixed the many bugs present in yesterday's early implementation, such as items breaking if the player possessed another creature and its model and item settings changed. The loop was also made as efficient as possible, doing simple and minimal checks before applying any changes.

+ Spoiler
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by Ivà » Tue Jun 23, 2015 07:44

This mod is turning into an impressive work full of features MirceaKitsune. It's fantastic :)
Are you planning to release a separate mod with only the mobs api and its logic? I'm thinking on something like peaceful_npc mod or similar.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Tue Jun 23, 2015 22:44

Today has been yet another day full of crazy new features. This is what has been added since last night:

- Items can have two special functions in their definitions: on_mob_wield, which executes per mob think while the item is wielded by the mob, and on_mob_punch, which executes if the mob punches someone while holding that item. For instance, you could add an on_mob_wield function to default:dirt in nodes.lua to make the mob do something while holding a stack of dirt. Items can virtually contain mob logics, which will be useful if stuff like firearms will be someday implemented. Mob targets and item entities (items module) can also have custom functions defined on them.

- Tool wearing has been implemented. If a creature punches another creature while holding a tool, that tool will degrade. This works for both the player's and mob's wielded items, and the amount is customizable in the default creature setup. Tools in a mob's inventory will also have a random wear when they spawn, also customizable.

- Mobs can pickup dropped items from the ground! This is achieved by using a custom target function for the "__builtin:item" item type, which makes the mob attack the item and take it in their inventory when punching. Feel free to drop a stack of items on the ground, then watch as mobs move toward it then it appears in their hand or on their belt.

- Players and mobs now drop their inventory to the ground when they die. If someone is killed, you will see nearby mobs quickly proceeding to loot the items that fell off the victim.

- API documentation for the items module, as well as all the new features described above.

Ivà wrote:This mod is turning into an impressive work full of features MirceaKitsune. It's fantastic :)
Are you planning to release a separate mod with only the mobs api and its logic? I'm thinking on something like peaceful_npc mod or similar.


I have put a lot of work into this and the Structures mod, so I appreciate that you like it! The creatures system and default creatures are already separate mods, but they're distributed into a single modpack in the GIT repository (easier to maintain). You can include "creatures" without "creatures_races_default" anytime in the Minetest mods folder, or simply disable the default races from the world's mods menu.
 

Rochambeau
Member
 
Posts: 68
Joined: Tue Sep 23, 2014 11:37

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by Rochambeau » Wed Jun 24, 2015 07:39

Great mod so far!

Two wishes though:
1. could you split up creatures_races_default/init.lua into several files for each mob or race? This way it would be easier to keep track of the whole thing.
2. could you implement reproduction of mobs (by feeding them special items)?
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Fri Jun 26, 2015 01:55

For today's update, I have some slightly bad news and some very good news.

The bad news is that I won't be able to add item pickpocketing like I announced. It turns out that for some reason, attached entities cannot have a bounding box, meaning you can't select worn items by looking at them. Considering this, the items module will pretty remain a visual effect to see wielded items without offering any gameplay changes, although that's still an useful and pleasant feature.

Now for the good news: During the last days, I've been hard at work implementing a realistic detection mechanism for mobs. Mobs no longer magically know where everyone around them is, just because it's within their view range. Target detection is instead based on three senses: Seeing, hearing, and touching. You can sneak up behind mobs, hide to not be noticed, and pretty much get the essential mechanics you see in most stealth games. This is the exact mechanism now used in GIT:

- Touching:

A mob will first of all notice a target if it's bumping into it. We know this by calculating the bounding box of the mob and that of the target, and checking if they are closer than 0.25m.

- Hearing:

An audibility mechanism was introduced. The function can be used by anything that triggers a sound connected to a player or mob, and can set them as audible by amount X and for duration Y. By default, a creature will be heard by mobs when it: Punches a node, digs a node, places a node, makes footstep sounds by walking, or makes a vocal sound (like the pain or attack sounds).

What's even cooler is that for nodes, audibility is automatically determined by the type of node you're interacting with. This is possible by fetching and using the gain value of the sounds directly from the node definition! For instance, mobs or players that walk on grass will produce less noise and be harder to hear than mobs who walk on stone, whereas digging a dirt node will draw less attention than breaking a glass node.

If you wish to sneak behind a mob without being heard, you must hold down the sneak button as you move. That way you will not get an audibility level, and mobs won't notice you if you're behind them and don't bump into anything.

- Vision:

The third check if visual sight, which itself got a few additions. The most important is a field of view scanner, which makes sure that mobs only see people in their view range and not those behind them! It uses the FOV setting from minetest.conf, meaning that whatever focal length the server defaults to for players will be used by mobs as well. The formula used to calculate the virtual cone was a bit problematic, and got written with a lot of help from TeTpaAka and Nore... you can see what went on in this thread or the IRC logs.

Detection will also depend on light level additionally. A creature standing in broad daylight will be easier to see, whereas a creature in a dark spot mode difficult. Hiding in the dark reduces the changes of being seen by an enemy mob.

Rochambeau wrote:Great mod so far!

Two wishes though:
1. could you split up creatures_races_default/init.lua into several files for each mob or race? This way it would be easier to keep track of the whole thing.
2. could you implement reproduction of mobs (by feeding them special items)?


I might consider #1 at some point. #2 probably won't happen for the default creatures, but might be possible to do by using a custom function in your creature definition... especially with how flexible scripting custom functionality without changing the core mod is now.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Sun Jun 28, 2015 12:02

A heads-up: I have re-licensed the code from WTFPL to LGPL. This mod has grown into a pretty large project, and as such I think it needs a clearer and less controverted license. Since LGPL is the license Minetest itself is released under, while I exclusively want all of my code to be free but always remain open-source, I am happy with this move.

Note that SimpleMobs by PilzAdam, which is what this mod was initially based on, is released under WTFPL. The license has no restrictions to re-licensing, whereas the latest version of Creatures is so different there are barely any code passages still resembling those of SimpleMobs. Therefore this is alright in relation to the original mod.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TeTpaAka » Sun Jun 28, 2015 17:18

 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Sun Jun 28, 2015 17:38

TeTpaAka wrote:https://github.com/minetest/minetest/pull/2827
https://github.com/minetest/minetest/pull/2738

These might be interesting for this mod.


Thank you for creating and mentioning these pull requests! They are both problems that affect my mod directly, as I noticed since the first days after I put it together. I was initially going to open a list of feature requests for them, as well as a few more engine bound limitations... glad someone else took notice of them.

Another noticeable one which should be easy to solve is makes_footstep_sounds not working for players either (not disabling footsteps). Perhaps you could fix that one as well sometime, if you're doing work in this area please?
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TeTpaAka » Sun Jun 28, 2015 18:58

MirceaKitsune wrote:Another noticeable one which should be easy to solve is makes_footstep_sounds not working for players either (not disabling footsteps). Perhaps you could fix that one as well sometime, if you're doing work in this area please?

https://github.com/minetest/minetest/pull/2852

EDIT:
Could you please make a list of issues that ought to be fixed for this mod? I really want to see your game and want to help creating it. (And I might use this mod for another subgame).
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Sun Jun 28, 2015 22:55

TeTpaAka wrote:https://github.com/minetest/minetest/pull/2852

EDIT:
Could you please make a list of issues that ought to be fixed for this mod? I really want to see your game and want to help creating it. (And I might use this mod for another subgame).


Wow... thanks for fixing that so quickly! To be honest, the list isn't all that long. The main problem is the lack of configurable collision boxes, followed by the wield hand not being customizable, then less noticeable things like the footstep sounds.

The only real remaining problems are finding ways to disable the builtin fall damage and lava damage for players. Some mobs (like the stone monster) can bathe in lava without being hurt, but the player version cannot. I'm not sure how these overrides can and should be handled however... after all, the lava node defines that there should be damage, so it would be silly to implement code to tell it not to. Fall damage should make sense to disable via a flag. Any ideas on how to solve this, as well as code changes that make sense in order to, would surely be helpful!

The rest are things that aren't so urgent. Like Lua entities having real inventories (can be worked around by storing item stacks in a table) or entities supporting floating name tags like players (would be nice but not urgently needed). Yaw interpolation is another thing that would greatly help to improve the mod visually, and has been a very wanted feature for players for ages... for some reason however, no one so far succeeded in doing it.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TeTpaAka » Sun Jun 28, 2015 23:03

MirceaKitsune wrote:The only real remaining problems are finding ways to disable the builtin fall damage and lava damage for players. Some mobs (like the stone monster) can bathe in lava without being hurt, but the player version cannot. I'm not sure how these overrides can and should be handled however... after all, the lava node defines that there should be damage, so it would be silly to implement code to tell it not to. Fall damage should make sense to disable via a flag. Any ideas on how to solve this, as well as code changes that make sense in order to, would surely be helpful!


The problem with the damage system of minetest is, that it is partly client side. Since recently, you can disable any damage dealt to a player with minetest.register_on_player_hpchange, but there is no way the server would know, what dealt the damage.
With the rest, I can't really help, sorry. Interpolating the yaw seems a bit too complex for me and you found a proper workaround for the inventories.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Sun Jun 28, 2015 23:07

TeTpaAka wrote:The problem with the damage system of minetest is, that it is partly client side. Since recently, you can disable any damage dealt to a player with minetest.register_on_player_hpchange, but there is no way the server would know, what dealt the damage.
With the rest, I can't really help, sorry. Interpolating the yaw seems a bit too complex for me and you found a proper workaround for the inventories.


No worries, your existing pulls help a lot with the essential problems. I also wasn't aware that register_on_player_hpchange can be used to solve this, although I know it's a relatively recent function. I will look into it and use this if it works, thanks for the heads up!
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TenPlus1 » Mon Jun 29, 2015 06:31

Check out the 3d_armor mod by Stu, I added crystal armor and a lava protection system that hurts the player when they aren't wearing full crystal armor... That may help you out here...

https://github.com/stujones11/minetest- ... r/3d_armor
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Mon Jun 29, 2015 11:09

TenPlus1 wrote:Check out the 3d_armor mod by Stu, I added crystal armor and a lava protection system that hurts the player when they aren't wearing full crystal armor... That may help you out here...

https://github.com/stujones11/minetest- ... r/3d_armor


Thank you. I know about the 3D armor mod, and was planning to create a fork for Creatures. With the items module however, I don't think I plan to any more... the module should be scriptable enough to allow this via attached entities and through custom inventory slots. Also because the bigger project I plan to use Creatures for will have a slightly different health system.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Tue Jun 30, 2015 21:39

Once again I went on a feature spree with the mod today, and added another set of changes which I think everyone will like:

- The biggest new feature is the ability to exorcise (de-possess) mobs! Players can now abandon their body, which turns them into a ghost and spawns a mob with their exact same settings (appearance, health, inventory, etc). Players can virtually jump from body to body this way, freely turning themselves into or out of whoever they want, and can even see their former selves walking around or following them! With the default creatures, you currently abandon your body by clicking your icon in the inventory formspec.

- Attack and armor groups are now customizable. Previously, mobs used a hardcoded "fleshy" group for damage, whereas now you can use your own damage types and make specific mobs weaker or stronger to specific tools.

- The damage system received several reworks: There are no longer any hardcoded "water" and "lava" settings for environment damage, and instead you specify node groups that mobs will take damage to. Mobs will also take damage based on the damage_per_second setting of the node they're standing in, which is a builtin parameter normally used for players and enabled for lava in minetest_game. Further more, breath and drowning are now emulated for mobs, and mobs that stay too long underwater will begin to drown just like players. Lastly, minetest.register_on_player_hpchange is now used to handle player damage, and can contain a custom function per creature definition like all other minetest.* hooks.

- Liquid viscosity is now accounted for mob movement, just like it is for players. If a mob is standing in a dense liquid, its movement speed will be affected by that liquid's viscosity setting.
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TenPlus1 » Wed Jul 01, 2015 07:04

Nicely done, downloading now to try it out :)
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TeTpaAka » Wed Jul 01, 2015 08:55

I really like the new additions.
But I found, that sheep grow their wool back when they are possessed. Their state isn't transferred to the player.

EDIT:
http://irc.minetest.ru/minetest/2015-07-01#i_4304467
It should be more like 1.57
The yaw is calculated in radians, so 90 degrees are pi/2, which is around 1.57.
But I agree, this should be fixed.
https://github.com/minetest/minetest/issues/2658
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by MirceaKitsune » Wed Jul 01, 2015 11:35

TeTpaAka wrote:I really like the new additions.
But I found, that sheep grow their wool back when they are possessed. Their state isn't transferred to the player.


Thanks! And yes... now that I think about it I can see why that happens, although I'm not sure when and how to fix it. Certain mob-only properties aren't as easy to persist on players, although players have a data table where they can be given custom parameters which could make this solvable. As I've spent a lot of time and energy working on the core mod, I might have to leave looking into this for later.

TeTpaAka wrote:EDIT:
http://irc.minetest.ru/minetest/2015-07-01#i_4304467
It should be more like 1.57
The yaw is calculated in radians, so 90 degrees are pi/2, which is around 1.57.
But I agree, this should be fixed.
https://github.com/minetest/minetest/issues/2658


Thanks for that info! I modified it and pushed a new commit, now I do "- (math.pi / 2)" which seems safest and I can confirm it works fine now. Indeed, I see no reason why getyaw and get_look_yaw return different numbers, I believe this should be fixed!
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TenPlus1 » Wed Jul 01, 2015 12:03

TeTpaAka: The simple solution to wool regrowing is that during possession an influx of energy causes said sheep to quickly grow it's wool... ehe
 

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

Re: [Mod] Creatures [git] [minetest_mods_creatures]

by TeTpaAka » Wed Jul 01, 2015 12:07

TenPlus1 wrote:TeTpaAka: The simple solution to wool regrowing is that during possession an influx of energy causes said sheep to quickly grow it's wool... ehe

I thought of that, too. But gameplay wise, it is cheaty. You can simply possess a sheep over and over again and receive infinite amounts of wool. Also, there is no explanation, where the energy comes from.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 4 guests

cron