Jump to content

Recommended Posts

Posted

Hey everyone, I am looking to hire a developer to create a plugin that would increase the chance of green genes to appear when a seed is planted (not to be mistaken with clones). The plugin would basically just take what the server does to calculate seed genes and make a higher chance for any green gene to appear.

This shouldn't be too difficult of a task, I'd be willing to pay $40 USD to have it done, counter offers are welcome but please be reasonable.

Types of seeds currently in the game:
 

seed.blue.berry
seed.black.berry
seed.green.berry
seed.red.berry
seed.white.berry
seed.yellow.berry
seed.corn
seed.hemp
seed.potato
seed.pumpkin
seed.corn


This is the current server implementation by Facepunch from decompiled server:
 

    private GrowableGenetics.GeneType PickWeightedGeneType()
    {
        IOrderedEnumerable<GrowableGenetics.GeneWeighting> weighting = 
            from w in (IEnumerable<GrowableGenetics.GeneWeighting>)GrowableGenes.slotWeights
            orderby w.Weighting
            select w;
        float single = 0f;
        foreach (GrowableGenetics.GeneWeighting geneWeighting in weighting)
        {
            single += geneWeighting.Weighting;
        }
        GrowableGenetics.GeneType geneType = GrowableGenetics.GeneType.Empty;
        float single1 = Random.Range(0f, single);
        float weighting1 = 0f;
        foreach (GrowableGenetics.GeneWeighting geneWeighting1 in weighting)
        {
            weighting1 += geneWeighting1.Weighting;
            if (single1 >= weighting1)
            {
                continue;
            }
            geneType = geneWeighting1.GeneType;
            return geneType;
        }
        return geneType;
    }

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
1.5m

Downloads

Total number of downloads.

7.1k

Customers

Total customers served.

105.6k

Files Sold

Total number of files sold.

2.1m

Payments Processed

Total payments processed.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.