Open mjuvekar7 opened 6 years ago
I'm going to be discussing this in the context of Edible Flora because that's the module that actually holds the content.
I can see using Genome to provide great depth to EF. Currently there is a basic progression system where you can craft together some seeds to get more advanced seeds. I'm thinking we could have a system that still implements this by default but then also includes method of breeding should Genome be activated.
This is what I'm thinking:
Keep the default the same as it currently is, however move the recipes from In Hand to a block (there is already one in place).
If Genome is enabled then keep the recipes the same, however make it only produce a new seed randomly. If a new seed isn't produced its a even chance for another of the same type as the inputs.
Implement Genome breeding mechanics on a number of different options. Food, Thirst, Color, Growth Rate and Number of Produce. Perhaps even on it being Sustainable.
Maybe another thing to vary could be biome / environmental conditions the thing can thrive in. Such as developing a cold-hardy variety of wheat that'll still grow in colder climates.
If we do more advanced/detailed biomes where they have gradients by the edges where one biome turns into another you could start out with a crop only growing well in the center of a biome but keep breeding it nearer and nearer to the edge and only select seeds from plants that do well -> you've developed a new variant. In that case you wouldn't even need a manual seed mixer process, if you rely on random mutations and select for desired traits.
I would consider that fairly advanced and long term however, need more advanced plants and such in the first place :-)
@jellysnake I don't understand the stuff after "This is what I'm thinking:" and before "Implement Genome breeding..."
So you mean to say that the seed mixer thing should be in EF? (Could work) What I have in mind for the seed mixer is:
So the way the farming family (Simple Farming, Edible Flora, Additional Vegetables & Additional Fruits) is structured is thus.
Simple Farming provides the system. It's not explicitly tied to Edible Flora, it /just/ provides the framework
Edible Flora provides the content. It uses Simple Farming as well as Hunger and Thirst.
Additional Fruits/Vegetables provides more content for Edible Flora. They are optional and used for people who want a richer and more expanded gameplay
Therefore if we want to add Genome to the content, it sits at the Edible Flora level because it's a system. This is why I'm wanting to reduce the impact on Simple Farming as much as possible.
So the seed mixer would exist in Edible Flora, the specific details of how the breeding works should be handled by Genome, only an interface should exist in Edible Flora.
What I mean by "the default" is the way Edible Flora currently works. I would also want to keep Edible Flora the same if the player doesn't activate Genome, only if it is activated do the advanced features emerge.
@vedant-shroff Mind updating this according to your progress during GSoC? :upside_down_face:
So I have addressed most of the points mentioned in this issue as well as in #46 in my GSoC project, Genome Expansion. Although some discussion in this issue suggests adding genetics to edible flora, it was decided, after much back and forth, that the genetics would sit at the SimpleFarming
level instead, so as to avoid re-writing code for other content modules (Like AdditionalFruits
and so on). Genomes is now an optional dependency of SimpleFarming, and if genomes is activated, seeds can be bred with genetics. This builds upon the work done by @arpan98 in #57 but reworks a lot of things done there. A GenomeAuthoritySystem
handles all the genetics related tasks and is optionally activated based on the modules selected.
Currently, the filling
trait of seeds is affected by the genes they have. The genes are given to seeds when they are harvested for the first time and it is carried on for all the generations of that seed. The filling
value is altered based on the genes that can be checked by the heldGenomeCheck
or visually observed by a tint added to the seed based on the filling value. Three different varieties of tints are possible, thus creating different types of seeds that can be obtained. The tinting is done via an optional dependency on SubstanceMatters
and therefore can be toggled by just deactivating the module.
The systems for adding new traits and genes to seeds are all in place and therefore adding new features should be an easy process now with a sort of template that can be followed. Genomes depends upon the content modules optionally, for example Genomes will depend upon thirst optionally if it is to modify the thirst value of a plant, and a system can be added to Genomes to modify this thirst with the corresponding handlers. More immediate scope for the genome integrations are regarding the varying growth rates of bushes based on the preferred biome of the seed (like @Cervator suggested above)
The seeds are bred in the SeedWorkstation
that is present in EdibleFlora. New recipes were added to the block, but this is only a temporary solution and it is desirable at some point to take these recipes out of the SeedWorkstation and add them to another independent block. There is some work on a new crafting module which will allow dragging and dropping ingredients into input slots. This new crafting module would be a much more desirable to create the seed breeder in. Also, Genomes was changed a bit to allow registering breeding algorithms per trait rather than for an entire group, and therefore more complex variations are possible in seeds with different continuous and discrete traits. Mutation is only a random value right now and has not been played with much.
Now that we have a rudimentary Genome module more or less in place, we should start working on integrating Genome into SimpleFarming.
A high-level description of this integration and its goals can be found in #46. Note, however, that some aspects of that issue may be outdated. #57 aims at getting started with this integration, but needs a major rework due to the recent refactor (in my opinion, we should just close it and start from scratch, reusing code from it where possible).
This issue aims at proposing a rough series of small goals leading to a complete, functioning implementation.
Edit: Some specific details, as discussed with @jellysnake
beforeProduceCreated
GenomeAuthoritySystem
which is active only when Genome is enabledbeforeProduceCreated
event in this system, and add the necessary GenomeComponents to the appropriate entities when such an event is received.