Content: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Background: Slate Blackcurrant Watermelon Strawberry Orange Banana Apple Emerald Chocolate Marble
Pattern: Blank Waves Notes Sharp Wood Rockface Leather Honey Vertical Triangles
Welcome to TerraFirmaCraft Forums

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more! This message will be removed once you have signed in.

  • Announcements

    • Dries007

      ATTENTION Forum Database Breach   03/04/2019

      There has been a breach of our database. Please make sure you change your password (use a password manager, like Lastpass).
      If you used this password anywhere else, change that too! The passwords themselves are stored hashed, but may old accounts still had old, insecure (by today's standards) hashes from back when they where created. This means they can be "cracked" more easily. Other leaked information includes: email, IP, account name.
      I'm trying my best to find out more and keep everyone up to date. Discord (http://invite.gg/TerraFirmaCraft) is the best option for up to date news and questions. I'm sorry for this, but the damage has been done. All I can do is try to make sure it doesn't happen again.
    • Claycorp

      This forum is now READ ONLY!   01/20/2020

      As of this post and forever into the future this forum has been put into READ ONLY MODE. There will be no new posts! A replacement is coming SoonTM . If you wish to stay up-to-date on whats going on or post your content. Please use the Discord or Sub-Reddit until the new forums are running.

      Any questions or comments can be directed to Claycorp on either platform.
Balthizarlucien

Domestication Through Mendelian Inheritance

37 posts in this topic

You have to remember that MC unloads distant chunks, movement of entities is limited to loaded areas. This is also the reason why in the dead of winter you can wander north reloading old areas and have no snow.

0

Share this post


Link to post
Share on other sites

Well you could have the wolf api but it depends on the season when it comes and goes

0

Share this post


Link to post
Share on other sites

My main vanilla TFC map has ~1.5 million chunks. The value of updating chunks I'm not using regularly is far far less important than the drag something like this would put on my system.

1

Share this post


Link to post
Share on other sites

Some years ago Mojang made the marketing decision of making Minecraft worlds Infinite. For the point of view of the uninformed player it was great, they could walk forever and keep exploring a lot more of the same biomes.

For anyone that knows a little bit of coding and want to create close systems, is a nightmare. Is the reason finite water does not work. If we had a finite world all kinds of calculations would be possible. it would be a lot easier to track animal movements, and things like Weather and climate.

With a finite World we could calculate exactly how many animal of each species existed in that world and work from there. 

I am totally in favor of a modification of Minecraft that allowed for finite world and all the benefits that would arise from that.

Just imagine a square 40K by 40K center around the 0.0 point, that would be 20K in each direction, more than enough for any single player or server.

1

Share this post


Link to post
Share on other sites

Some years ago Mojang made the marketing decision of making Minecraft worlds Infinite. For the point of view of the uninformed player it was great, they could walk forever and keep exploring a lot more of the same biomes.For anyone that knows a little bit of coding and want to create close systems, is a nightmare. Is the reason finite water does not work. If we had a finite world all kinds of calculations would be possible. it would be a lot easier to track animal movements, and things like Weather and climate.With a finite World we could calculate exactly how many animal of each species existed in that world and work from there. I am totally in favor of a modification of Minecraft that allowed for finite world and all the benefits that would arise from that.Just imagine a square 40K by 40K center around the 0.0 point, that would be 20K in each direction, more than enough for any single player or server.

When I started my tiny side project to program the best possible terrain generator I made a similar decision minus one important detail... Infinite worlds are highly desired so it still needs to be procedural. The way I decided to solve this was to generate "islands" in their entirely one at a time. The user would use the very same seed system and all coding for the terrain would be essentially the same but the user would specify the "island" size based on categorical presets like desert island or continent etc. as well as the intended climate type again from a catagory list so if you wanted arctic or equatorial you got it :) the game would then generate the terrain all up front based on the seed and place rivers, biomes etc where they should actually be on such an island if they were to be there. The best part of that system was the fact that it used simplex noise, brownian filtering and four categorical erosion filters that made the terrain really come to life. With all that work done up front you could easily jump in and play and experience virtually no processor lag while exploring.But this has almost nothing to do with animals or their breeding so let's try to get back on topic :P The way I would solve the population control problem would be to first tweak the ratios to suit game play. Then I would pull from the time control that Tfc has already built in to manage the appropriate population adjustments. I personally would first try out the predator /prey interaction through a few dozen shell worlds with excelerated times and tweak the hunger/ ratios/ aggression/ strength etc until it was allowing for a self maintaining population balance within the test environment. From there I would allow a few dozen simulations process through about a decade of TFC time with logging enabled for population count.With data in hand at that point I would just allow the game to take the elapsed time and adjust the population per chunk based on the average shifts discovered through testing. This would replicate the illusion of an active population without wasting processor or memory resources. But that is just how I would handle it myself. I'm sure there are probably some ways to shortcut the process and still make it reasonably believable.
0

Share this post


Link to post
Share on other sites

I like your ideas. You should start an addon project, I am pretty sure people would help you. That would really bring animal life to tfc. I love the work that dunk has been doing, I just wish it was already done.

1

Share this post


Link to post
Share on other sites

I like your ideas. You should start an addon project, I am pretty sure people would help you. That would really bring animal life to tfc. I love the work that dunk has been doing, I just wish it was already done.

 

I would definitely like to be able to help dunk with the mobs for TFC and provide an example of my suggested code but I don't know if I have the time to do so :( I have a three year old, a full time job, I am the writer of a comic which will be released early to mid summer 2015 ANNNNND I am looking for a job as a programmer since I am freshly out of college and have yet to find a job in my field. I am planning on creating a mod for TFC which will add traditional pagan rituals and sympathetic magic etc to the game whenever I get a spare moment lol. I will see if I can write something up for at least one prey and predator pair though.... any preferences?

0

Share this post


Link to post
Share on other sites

Yeah I know the feeling. I have a full time job, wife and 4 kids, plus I am studying to get  re certified by microsoft. I'm a Systems administrator for Microsoft servers. Looks fancy, but all I do is manager the network and Active Directory.

I wanted to learn Java. But right now I just cant find the time to do it.

0

Share this post


Link to post
Share on other sites

Good ideas! A little complicated yes, but I like the approach you're taking. Currently, animals do store values representing different attributes.

public float size_mod;			//How large the animal ispublic float strength_mod;		//how strong the animal ispublic float aggression_mod = 1;//How aggressive / obstinate the animal ispublic float obedience_mod = 1;	//How well the animal responds to commands.public float colour_mod = 1;	//what the animal looks likepublic float climate_mod = 1;	//climate adaptabilitypublic float hard_mod = 1;		//hardiness

From the deer class. All our animals have these values, and they control how the animal may behave to certain degrees. Values for the numbers are generated from an RNG with a bias towards 1. The basic idea is that "1" represents the average value for a species. The exception is that when a female animal generates a size_mod, she multiplies it by 0.9 (for example, it actually varies between animals) meaning she is 90% the size of a male. size_mod renders visually to players by slightly altering the animal's size. The other values are a bit harder to figure out, and some are currently unused. Combinations of these attributes contribute to the way the animal can interact with the world and players. When wolves or bears attack, the damage inflicted is based on these values:

int var2 = (int)(TFC_MobData.WolfDamage * getStrength() * getAggression() * (getSize()/2 + 0.5F));

and when you're taming the animals, it will have an impact as well:

float familiarityChange = (6 * obedience_mod / aggression_mod);

When an animal is bred, its values are generated based on an RNG and its parents. While wild animals generate values biased towards 1, offspring generate values biased towards the average of their parents' values, adjusted for sex. So if the mother and father of your baby animal both have obediences of 1.1, any babies would have an average obedience of 1.1, but the most obedient of them might be more obedient than any animal that could be produced in the wild and the least obedient would still be more obedient than the least obedient one in the wild.

1

Share this post


Link to post
Share on other sites

~public float size_mod; //How large the animal is

 

This equates to the same Size modifier I was talking about. :) It appears that the way size is handled is really good but I believe that you could modify this to allow for significantly larger variations within a single species. With the inclusion of a genetic algorithm you could enable dynamic size modification to the base size according to survival rates which would allow for the wild population to adapt according to terrain, food, water and other environmental factors but you may need to include a basic (but appropriate) dietary tracking to each animal class so you can use a nutrition variable to adjust the animals health as well as fertility and size.

 

~public float strength_mod; //how strong the animal is

 

This is basically the same as well! I would like to see this stat influence things like carrying capacity and cart pulling (to give a reason for roads but also because it would be nice to have some way to transport the equivalent of a large chest worth of goods) but I understand if that would tweak mechanics in the wrong direction.

 

 

~public float aggression_mod = 1; //How aggressive / obstinate the animal is

 

This is very close to the stat I was talking about called temperament and acts roughly the same as well. domestication is domestication no matter the name :P

 

~public float obedience_mod = 1; //How well the animal responds to commands.

 

This could equate to intelligence but I again do not know if Minecraft uses a Finite State Machine model to control AI. If it does, you could incorporate some useful and trainable traits like pigs which root through dirt for food. If you added this and things like truffles I could have a truffle hunting pig lol. You should also include some AI which are either only very specifically useful or generally useless to enable a visible range of intelligence. For example, you could add a basic AI script which has a rare trigger like (if block.snow == true) the animal will flee. This would essentially force a migration south and cause the animals to vacate a given area.

 

~public float colour_mod = 1; //what the animal looks like

 

this is a no duh stat. I might make one expansion here though dunk. You could make this influence more than just the visual appearance of the animal. Incorporate the color into the mob detection AI for each animal so that if an animal is born with a color that is not able to be easily seen by a predator it would influence the local population. That is of course just a thought. It would however allow players to create camouflage by picking the correct color clothing or armor to wear which would be really cool.

 

Heck, you could also allow for the animal to pick from a random range within the spectrum and use the skin transition technique as well to allow for a broader range of coloration and patterning. Implementation would be very simple because you could use the way trees change color to shift the animal's color just ensure you use greyscale skins for the animals at that point. Of course again I am talking about a genetic algorithm to incorporate inheritance here but I am sure you knew that.

 

~public float climate_mod = 1; //climate adaptability

 

I am glad to see that you have included this. Climate adaptability could yield some very interesting effects if you added them correctly :) you could, for example, increase wild sheep wool drops from a modifier associated with this. The same goes for lard from pigs etc. You could also scale the model size for the body segment, leg segment etc to display the "extra bulk" the animal is carrying. You could even implement the same transition of texture I mentioned before to display a coat length phasing from exceptionally short haired to extremely (almost borderline crazy) long hair. This could then be used to display not only coat adaptations but also things like the difference between a winter coat and a summer coat. That would be a very nice touch which would most likely take very little actual code as the transition code has already been written for food :)

 

public float hard_mod = 1; //hardiness

 

This call I am not sure of. What is its intent? Is Hardiness its resistance to damage or is it a resistance to an environmental effect or even possibly an increase in the animal's hit points? I would love some clarification on it as I am sure a bit of thought was included with its use but with so little code to reference I can only infer.

 

The calls which you could add to this would be the following:

 

public float horn_mod = 1;

 

/* This would accurately represent the extra damage done from animals which have horns, tusks, spurs or the like as these are intended by nature to be used as weapons.

*/

to include the horn_mod to the damage I would use a simple if-else statement like this:

 

if(horns == true)

{

int var2 = (int)(TFC_MobData.WolfDamage * getStrength() * getAggression() * horn_mod() * (getSize()/2 + 0.5F));

}

 

else

{

int var2 = (int)(TFC_MobData.WolfDamage * getStrength() * getAggression() * (getSize()/2 + 0.5F));

}

 

Senses

 

As I am unsure how the Minecraft Client handles mob detection I cannot write an example for you to understand my thought process but I can give you a mod to reference that handle similar functions...

 

Zombie Awareness – This mod contains hearing, smell and normal sight. I am sure it is a simple block detection method it uses to reference but that is a guess.

 

Volume of Production

 

This would be a bit more difficult to control but I think it would make or break a breeding and animal husbandry system as it is the primary reason we breed livestock in the first place. There are products that animals produce that could simply be varied for output. Wool is a good example. When shearing a wild sheep from a warm climate you should only get a small amount of wool. When shearing the same sheep living in a cold climate it should drop more wool.

 

This trait could easily be bred for by the same means as any other inheritable. You should determine what the maximum feasible output could be (I can look into sheep breeds and tell you if you want) and then simply create another sliding scale. Output of product could even be applied to offspring. You would simply create the function for the output of a product and then feed in separate adjustable variables [one for each possible product] to generate said output be it milk or calves.

 

 

These are simply my own suggestions regarding the traits in each animal and with the addition of the other two it would really round out animal husbandry and make breeding a very customizable.

 

 

Overall Dunk, the animals you have made are all very well written and are decent representations of their realistic selves. I am simply interested in helping Improve them so that they are able to be more variable in the wild and allow for players to be able to feel a strong sense of accomplishment in creating their own breed of livestock just as they do when they Finally craft that first piece of armor or build the epic house of their survival dreams. The breeding segment of TFC feels a bit weaker in implementation as compared to the rest of agriculture and some of these simple changes would really boost it to the same level.

 

If you would like me too I will continue to collect the research needed to fulfill these traits for the rest of the animal lineup I mentioned as well as reference images for whomever built those impeccable models. If I was better at modeling I would offer to do that as well but I am by no means an artist. 

 

were there any animals I named that you do not approve of Dunk?

 

​[re-posted for reference]

 

Prey                                                                   Predator

 

Aurochs                                                             Timber Wolf

Bezoar Ibex (goat)                                         Fox

WIld Boar                                                          Mountain Lion

Mouflon (sheep ancestor)                          Owl

White Tailed Deer                                           Falcon

American Bison                                               Snake

Red JungleFowl (chicken)                             Crocodile

Mallard Duck                                                    Wild Cat (typically known in Great Britain and its also endangered...  :( )

Przewalski Horse                                            Bear

American Wild Turkey                                   Badger

Eastern Cotton Tail

Pheasant

0

Share this post


Link to post
Share on other sites

Pheasants are already in the game, just in case you didn't know.Also, just in case you didn't know, TFC is open source. You can find most of our mob code here if you want to see how the AI works: https://github.com/Deadrik/TFCraft/tree/master/src/Common/com/bioxx/tfc/Entities

I was aware of pheasants in TFC but I'm also aware they cannot be bred. I think that it would be neat to be able to breed all of the animals on my list. It would allow for a very diverse and climatically themed farms. And every animal on my list has been bred in captivity and a big number of them are even commercially farmed as well.Thank you for letting me know that TFC is open source as that was something I did not know. I will probably spend several hours pouring over the code now so I can get intimately familiar with the inner workings of it. If I find any bugs or logic errors I will be happy to pm you about it :)
0

Share this post


Link to post
Share on other sites