Author Topic: Share Your Nectar Making Recipes  (Read 220138 times)

bshag

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #50 on: December 26, 2009, 11:24:31 AM »
Hi Prairie, welcome to the forum and thanks for the recipe.  I seem to be having a little difficulty having good tasting nectar.  ::)

Always did like cherry limeade.  :)

shanadowa

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #51 on: December 28, 2009, 02:37:16 PM »
Here are 2 Amazing that I have found and didn't see posted yet:
6 Meloire Grapes and 4 Cherries
6 Cherries and 4 Pomeganate.

Working my way through 60-40% mixes atm and that is what I have found so far, along with a ton of great tasting batches.




Registered members do not see ads on this Forum. Register here.

Fatmice

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #52 on: December 30, 2009, 06:47:41 PM »
The randomly generated value is used in two ways.

First off, it is the ONLY factor affecting flavor.  Amazing/Great/Terrible/etc. is all dependent on this flavor value.  It takes the string "Apple Apple Grape Grape etc." (I'm not sure exactly on the names/formating).  It hashes this value.  It then converts the hashed value to an integer and uses this as the seed for the Randomizer.  It then pulls out 3 floats from the Randomizer, and averages them.  If the number is less than .5, it multiplies it by two.  If the number is above .5, it subtracts .5 and then multiplies by 2.  It then adds the median combo multiplier (fixed value set internally but modifiable) to the product of (the Max combo multipler minus the median combo multiplier) and the value computed above.  It then compares this to it's internal threshold levels of .5, 1.2, 2.5 and 4 (these are individually modifiable as well).  Anything below .5 is terrible, .5-1.1999 is poor, 1.2-2.4999 is well, etc.

Now this value is also used as a multiplier (along with several other multipliers including whether you have flavorful feet, upgrades to nectar maker, your skill level, etc.) to determine the value of the bottle.  This does explain why there's variance within the Terrible, Great, Amazing, etc. ranges.  It's not using Amazing as a multiplier.  It's using the value determined above as a multiplier. Further explanation in P.P.S.

Hope this helps.

P.S.  I'm a little burnt out, so I'm not going to put a how-to guide on how to access all this information.  Do a google search on reflector (the app I'm using to look at files), and "sims 3" and that should get you started.  You'll also have to unpack some of the game files which you can do with s3pe.  When you get all that done, the info above is in "Sims3.Gameplay.Objects.HobbiesSkills.NectarMaker.NectarFinishTask".

P.P.S. Code for determining value:
float baseValue = ((((((num * num2) * num4) * this.mFlavorMultiplier) * num7) * kQualityLevelMultiplier[((int) num5) - 1]) * this.mMultiplierFromFeet) * makeStyleValueModifier;

num = sum of the internal nectar values associated with all ingredients (for example, apple is 5, life fruit is 22 - this is regardless of quality)
num2 = Random Multiplier (although it's constrained to a range that's set by other constants)
num4 = skill multiplier
FlavorMultiplier = Whether the nectar maker is flavor upgraded (1 if not, more if it is)
num7 = the long "taste" multiplier i talked about at beginning of post
QualityLevelMultiplier & num5 = Multiplier based on quality of produce
MultiplierFromFeet = Flavorful feet multiplier (1 if regular feet, more if sim is challenged [pun intended])
MakeStyleModifier = Multiplier based on the kind of nectar you made (extended, concentrated, mass produce, etc.)



Which game file/package are you dumping?  I'd like to take a look at the code myself to see if it is replicable.  From the sound of it, this "random" generator can probably be replicated with +/- % since each computer will have small deviation.

Currently, I looked under GameplayData.package with s3pe and there are several xml entries related to nectar that were interesting.  I do not see any of the codes that you have presented.


Fatmice

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #53 on: January 01, 2010, 12:20:18 AM »
Found the codes.  I will be disecting these over the next several days.  Hopefully, I can replicate this outside of the game.  It might be possible to create an object in game that calls the private class to find effective combination ingame.

Class member that generate the nectar quality.  This is found under Sims3GameplayObjects.dll
Code: [Select]
private void NectarFinishTask()
{
    List<Ingredient> fruitsUsed = base.Inventory.FindAll<Ingredient>(false);
    foreach (GameObject obj2 in fruitsUsed)
    {
        base.Inventory.SetNotInUse(obj2);
    }
    if (((fruitsUsed != null) && (fruitsUsed.Count > 0)) && (this.mLastSimToMake != null))
    {
        float num = 0f;
        float num2 = (((float) RandomGen.NextDouble()) * (kMaxGlobalValueVariance - kMinGlobalValueVariance)) + kMinGlobalValueVariance;
        int skillLevel = this.mLastSimToMake.SkillManager.GetSkillLevel(SkillNames.Nectar);
        float num4 = ((kLevel10Multiplier - kLevel0Multiplier) * (((float) skillLevel) / 10f)) + kLevel0Multiplier;
        fruitsUsed.Sort();
        string str = "";
        bool flag = true;
        Ingredient ingredient = fruitsUsed[0];
        string key = "";
        Dictionary<string, int> ingredients = new Dictionary<string, int>();
        if (ingredient != null)
        {
            key = ingredient.Data.Key;
        }
        float num5 = 0f;
        foreach (Ingredient ingredient2 in fruitsUsed)
        {
            if (flag && !key.Equals(ingredient2.Data.Key))
            {
                flag = false;
            }
            str = str + ingredient2.Data.Key;
            if (!ingredients.ContainsKey(ingredient2.Data.Key))
            {
                ingredients.Add(ingredient2.Data.Key, 1);
            }
            else
            {
                Dictionary<string, int> dictionary2;
                string str9;
                (dictionary2 = ingredients)[str9 = ingredient2.Data.Key] = dictionary2[str9] + 1;
            }
            num += ingredient2.Data.NectarValue;
            num5 += (float) ingredient2.GetQuality();
            base.Inventory.TryToRemove(ingredient2);
        }
        num5 /= (float) fruitsUsed.Count;
        uint hash = ResourceUtils.HashString32(str);
        float num7 = 1f;
        if (!flag)
        {
            num7 = CalculateHashMultiplier(hash);
        }
        float makeStyleValueModifier = this.GetMakeStyleValueModifier(this.mLastUsedMakeStyle);
        int makeStyleBottleModifier = this.GetMakeStyleBottleModifier(this.mLastUsedMakeStyle);
        float baseValue = ((((((num * num2) * num4) * this.mFlavorMultiplier) * num7) * kQualityLevelMultiplier[((int) num5) - 1]) * this.mMultiplierFromFeet) * makeStyleValueModifier;
        int numBottles = (kNumBottlesPerBatch + this.mBottleDifference) + makeStyleBottleModifier;
        NectarSkill skill = this.mLastSimToMake.SkillManager.GetSkill<NectarSkill>(SkillNames.Nectar);
        if ((skill != null) && skill.IsNectarMaster())
        {
            numBottles += NectarSkill.kExtraBottlesNectarMaster;
        }
        List<IngredientNameCount> list2 = new List<IngredientNameCount>();
        foreach (string str3 in ingredients.Keys)
        {
            list2.Add(new IngredientNameCount(str3, ((float) ingredients[str3]) / ((float) fruitsUsed.Count)));
        }
        list2.Sort();
        string str4 = "";
        string str5 = "";
        if (list2.Count > 0)
        {
            str4 = IngredientData.NameToDataMap[list2[0].IngredientName].Name;
        }
        if (list2.Count > 1)
        {
            str5 = IngredientData.NameToDataMap[list2[1].IngredientName].Name;
        }
        List<NectarSkill.NectarBottleInfo> mTopNectarsMade = new List<NectarSkill.NectarBottleInfo>();
        if (skill != null)
        {
            mTopNectarsMade = skill.mTopNectarsMade;
        }
        string mBottleName = "";
        if (string.IsNullOrEmpty(str5))
        {
            mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarNameOneFruit", new object[] { str4 });
        }
        else
        {
            mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarName", new object[] { str4, str5 });
            if (mBottleName.Length > 40)
            {
                mBottleName = Localization.LocalizeString("Gameplay/Objects/CookingObjects/NectarBottle:NectarNameOneFruit", new object[] { str4 });
            }
        }
        foreach (NectarSkill.NectarBottleInfo info in mTopNectarsMade)
        {
            if (info.mFruitHash == hash)
            {
                mBottleName = info.mBottleName;
            }
        }
        string entryKey = "Gameplay/Objects/HobbiesSkills/NectarMaker:";
        if (flag)
        {
            entryKey = entryKey + "NameBottleDialogJustOneFruit";
        }
        else if (num7 < kPoorComboThreshold)
        {
            entryKey = entryKey + "NameBottleDialogTerribly";
        }
        else if (num7 < kWellComboThreshold)
        {
            entryKey = entryKey + "NameBottleDialogPoor";
        }
        else if (num7 < kGreatComboThreshold)
        {
            entryKey = entryKey + "NameBottleDialogWell";
        }
        else if (num7 < kAmazingComboThreshold)
        {
            entryKey = entryKey + "NameBottleDialogGreat";
        }
        else
        {
            entryKey = entryKey + "NameBottleDialogAmazing";
        }
        string name = StringInputDialog.Show(Localization.LocalizeString("Gameplay/Objects/HobbiesSkills/NectarMaker:NameBottleDialog", new object[0]), Localization.LocalizeString(entryKey, new object[0]), mBottleName, 40, 5);
        bool flag2 = false;
        if (skill != null)
        {
            skill.MadeXBottles(numBottles);
            skill.UsedFruits(fruitsUsed);
            skill.NectarTypeMade(new NectarSkill.NectarBottleInfo(hash, name, ingredients, (int) baseValue));
            flag2 = skill.ReachedMaxLevel();
        }
        int dateNum = ((int) SimClock.ConvertFromTicks(GameStates.TimeInHomeworld.Ticks, TimeUnit.Weeks)) + 1;
        for (int i = 0; i < numBottles; i++)
        {
            NectarBottle item = GlobalFunctions.CreateObjectOutOfWorld("NectarBottle", null, new NectarBottleObjectInitParams(hash, name, list2, "Gameplay/Objects/HobbiesSkills/NectarMaker:Weeks", dateNum, baseValue, baseValue, this.mLastSimToMake, flag2)) as NectarBottle;
            this.mBottles.Add(item);
            EventTracker.SendEvent(EventTypeId.kMadeNectar, this.mLastSimToMake.CreatedSim, item);
        }
        if (this.mBottles.Count > 0)
        {
            this.mCurrentStateMachine.SetActor("nectarBottle", this.mBottles[0]);
        }
        this.mCurrentStateMachine.RequestState("nectarMaker", "Exit");
        this.mCurrentStateMachine.Dispose();
        this.mCurrentStateMachine = null;
        this.mMultiplierFromFeet = 1f;
        this.mLastUsedMakeStyle = MakeNectarStyle.Basic;
        this.mLastSimToMake = null;
        this.CurrentState = NectarMakerState.FruitAddable;
    }
}

The code above calls RandomGen.  This is found under SimIFace.dll


Code: [Select]
public sealed class RandomGen
{
    // Fields
    private static IRandom gRandomGen;

    // Methods
    private RandomGen()
    {
    }

    public static double NextDouble()
    {
        if (gRandomGen == null)
        {
            gRandomGen = (IRandom) AppDomain.CurrentDomain.GetData("RandomGen");
            if (gRandomGen == null)
            {
                return 0.0;
            }
        }
        return gRandomGen.NextDouble();
    }
}

So RandomGen is a child of IRandom which is derived from Random.  This IRandom is also found under SimIFace.dll while Random is found under ScriptCore.dll.  Now Random is a derived from System.Objects which is found under mscorlib.dll.  Under mscorlib.dll, there is another "Random", System.Random...  I can only guess that the SciptCore.dll Random is some how a child of System.Random.

code for SimIFace.IRandom
Code: [Select]
public interface IRandom
{
    // Methods
    double NextDouble();
}

cod for ScriptCore.Random
Code: [Select]
public sealed class Random : IRandom
{
    // Methods
    public Random()
    {
        AppDomain.CurrentDomain.SetData("RandomGen", this);
    }

    public double NextDouble()
    {
        return Random_NextDoubleImpl();
    }

    [DllImport("Sims3Common.dll")]
    private static extern double Random_NextDoubleImpl();
}

code for System.Random
Code: [Select]
[Serializable]
public class Random
{
    // Fields
    private int inext;
    private int inextp;
    private const int MBIG = 0x7fffffff;
    private const int MSEED = 0x9a4ec86;
    private const int MZ = 0;
    private int[] SeedArray;

    // Methods
    public Random() : this(Environment.TickCount)
    {
    }

    public Random(int Seed)
    {
        this.SeedArray = new int[0x38];
        int num2 = 0x9a4ec86 - Math.Abs(Seed);
        this.SeedArray[0x37] = num2;
        int num3 = 1;
        for (int i = 1; i < 0x37; i++)
        {
            int index = (0x15 * i) % 0x37;
            this.SeedArray[index] = num3;
            num3 = num2 - num3;
            if (num3 < 0)
            {
                num3 += 0x7fffffff;
            }
            num2 = this.SeedArray[index];
        }
        for (int j = 1; j < 5; j++)
        {
            for (int k = 1; k < 0x38; k++)
            {
                this.SeedArray[k] -= this.SeedArray[1 + ((k + 30) % 0x37)];
                if (this.SeedArray[k] < 0)
                {
                    this.SeedArray[k] += 0x7fffffff;
                }
            }
        }
        this.inext = 0;
        this.inextp = 0x1f;
    }

    public virtual int Next()
    {
        return (int) (this.Sample() * 2147483647.0);
    }

    public virtual int Next(int maxValue)
    {
        if (maxValue < 0)
        {
            throw new ArgumentOutOfRangeException(Locale.GetText("Max value is less then min value."));
        }
        return (int) (this.Sample() * maxValue);
    }

    public virtual int Next(int minValue, int maxValue)
    {
        if (minValue > maxValue)
        {
            throw new ArgumentOutOfRangeException(Locale.GetText("Min value is greater then max value."));
        }
        uint num = (uint) (maxValue - minValue);
        if (num == 0)
        {
            return minValue;
        }
        int num2 = ((int) (this.Sample() * num)) + minValue;
        if (num2 == maxValue)
        {
            return (num2 - 1);
        }
        return num2;
    }

    public virtual void NextBytes(byte[] buffer)
    {
        if (buffer == null)
        {
            throw new ArgumentNullException("buffer");
        }
        for (int i = 0; i < buffer.Length; i++)
        {
            buffer[i] = (byte) (this.Sample() * 256.0);
        }
    }

    public virtual double NextDouble()
    {
        return this.Sample();
    }

    protected virtual double Sample()
    {
        if (++this.inext >= 0x38)
        {
            this.inext = 1;
        }
        if (++this.inextp >= 0x38)
        {
            this.inextp = 1;
        }
        int num = this.SeedArray[this.inext] - this.SeedArray[this.inextp];
        if (num < 0)
        {
            num += 0x7fffffff;
        }
        this.SeedArray[this.inext] = num;
        return (num * 4.6566128752457969E-10);
    }
}

Fatmice

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #54 on: January 01, 2010, 12:46:00 AM »
Math class

Code: [Select]
public static class Math
{
    // Fields
    private static double doubleRoundLimit = 1E+16;
    public const double E = 2.7182818284590451;
    private const int maxRoundingDigits = 15;
    public const double PI = 3.1415926535897931;
    private static double[] roundPower10Double = new double[] { 1.0, 10.0, 100.0, 1000.0, 10000.0, 100000.0, 1000000.0, 10000000.0, 100000000.0, 1000000000.0, 10000000000, 100000000000, 1000000000000, 10000000000000, 100000000000000, 1E+15 };

    // Methods
    public static decimal Abs(decimal value)
    {
        return decimal.Abs(value);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Abs(double value);
    public static short Abs(short value)
    {
        if (value >= 0)
        {
            return value;
        }
        return AbsHelper(value);
    }

    public static int Abs(int value)
    {
        if (value >= 0)
        {
            return value;
        }
        return AbsHelper(value);
    }

    public static long Abs(long value)
    {
        if (value >= 0L)
        {
            return value;
        }
        return AbsHelper(value);
    }

    [CLSCompliant(false)]
    public static sbyte Abs(sbyte value)
    {
        if (value >= 0)
        {
            return value;
        }
        return AbsHelper(value);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern float Abs(float value);
    private static short AbsHelper(short value)
    {
        if (value == -32768)
        {
            throw new OverflowException(Environment.GetResourceString("Overflow_NegateTwosCompNum"));
        }
        return -value;
    }

    private static int AbsHelper(int value)
    {
        if (value == -2147483648)
        {
            throw new OverflowException(Environment.GetResourceString("Overflow_NegateTwosCompNum"));
        }
        return -value;
    }

    private static long AbsHelper(long value)
    {
        if (value == -9223372036854775808L)
        {
            throw new OverflowException(Environment.GetResourceString("Overflow_NegateTwosCompNum"));
        }
        return -value;
    }

    private static sbyte AbsHelper(sbyte value)
    {
        if (value == -128)
        {
            throw new OverflowException(Environment.GetResourceString("Overflow_NegateTwosCompNum"));
        }
        return -value;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Acos(double d);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Asin(double d);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Atan(double d);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Atan2(double y, double x);
    public static long BigMul(int a, int b)
    {
        return (a * b);
    }

    public static decimal Ceiling(decimal d)
    {
        return decimal.Ceiling(d);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Ceiling(double a);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Cos(double d);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Cosh(double value);
    public static int DivRem(int a, int b, out int result)
    {
        result = a % b;
        return (a / b);
    }

    public static long DivRem(long a, long b, out long result)
    {
        result = a % b;
        return (a / b);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Exp(double d);
    public static decimal Floor(decimal d)
    {
        return decimal.Floor(d);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Floor(double d);
    public static double IEEERemainder(double x, double y)
    {
        double d = x % y;
        if (double.IsNaN(d))
        {
            return double.NaN;
        }
        if ((d == 0.0) && double.IsNegative(x))
        {
            return double.NegativeZero;
        }
        double num2 = d - (Abs(y) * Sign(x));
        if (Abs(num2) == Abs(d))
        {
            double a = x / y;
            if (Abs(Round(a)) > Abs(a))
            {
                return num2;
            }
            return d;
        }
        if (Abs(num2) < Abs(d))
        {
            return num2;
        }
        return d;
    }

    private static unsafe double InternalRound(double value, int digits, MidpointRounding mode)
    {
        if (Abs(value) < doubleRoundLimit)
        {
            double num = roundPower10Double[digits];
            value *= num;
            if (mode == MidpointRounding.AwayFromZero)
            {
                double num2 = SplitFractionDouble(&value);
                if (Abs(num2) >= 0.5)
                {
                    value += Sign(num2);
                }
            }
            else
            {
                value = Round(value);
            }
            value /= num;
        }
        return value;
    }

    private static unsafe double InternalTruncate(double d)
    {
        SplitFractionDouble(&d);
        return d;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Log(double d);
    public static double Log(double a, double newBase)
    {
        if ((newBase != 1.0) && ((a == 1.0) || ((newBase != 0.0) && !double.IsPositiveInfinity(newBase))))
        {
            return (Log(a) / Log(newBase));
        }
        return double.NaN;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Log10(double d);
    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static byte Max(byte val1, byte val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static decimal Max(decimal val1, decimal val2)
    {
        return decimal.Max(val1, val2);
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static double Max(double val1, double val2)
    {
        if (val1 > val2)
        {
            return val1;
        }
        if (double.IsNaN(val1))
        {
            return val1;
        }
        return val2;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static short Max(short val1, short val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static int Max(int val1, int val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static long Max(long val1, long val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static sbyte Max(sbyte val1, sbyte val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static float Max(float val1, float val2)
    {
        if (val1 > val2)
        {
            return val1;
        }
        if (float.IsNaN(val1))
        {
            return val1;
        }
        return val2;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success), CLSCompliant(false)]
    public static ushort Max(ushort val1, ushort val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static uint Max(uint val1, uint val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static ulong Max(ulong val1, ulong val2)
    {
        if (val1 < val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static byte Min(byte val1, byte val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static decimal Min(decimal val1, decimal val2)
    {
        return decimal.Min(val1, val2);
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static double Min(double val1, double val2)
    {
        if (val1 < val2)
        {
            return val1;
        }
        if (double.IsNaN(val1))
        {
            return val1;
        }
        return val2;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static short Min(short val1, short val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static int Min(int val1, int val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static long Min(long val1, long val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static sbyte Min(sbyte val1, sbyte val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static float Min(float val1, float val2)
    {
        if (val1 < val2)
        {
            return val1;
        }
        if (float.IsNaN(val1))
        {
            return val1;
        }
        return val2;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static ushort Min(ushort val1, ushort val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static uint Min(uint val1, uint val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [CLSCompliant(false), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static ulong Min(ulong val1, ulong val2)
    {
        if (val1 > val2)
        {
            return val2;
        }
        return val1;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Pow(double x, double y);
    public static decimal Round(decimal d)
    {
        return decimal.Round(d, 0);
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Round(double a);
    public static decimal Round(decimal d, int decimals)
    {
        return decimal.Round(d, decimals);
    }

    public static decimal Round(decimal d, MidpointRounding mode)
    {
        return decimal.Round(d, 0, mode);
    }

    public static double Round(double value, int digits)
    {
        if ((digits < 0) || (digits > 15))
        {
            throw new ArgumentOutOfRangeException("digits", Environment.GetResourceString("ArgumentOutOfRange_RoundingDigits"));
        }
        return InternalRound(value, digits, MidpointRounding.ToEven);
    }

    public static double Round(double value, MidpointRounding mode)
    {
        return Round(value, 0, mode);
    }

    public static decimal Round(decimal d, int decimals, MidpointRounding mode)
    {
        return decimal.Round(d, decimals, mode);
    }

    public static double Round(double value, int digits, MidpointRounding mode)
    {
        if ((digits < 0) || (digits > 15))
        {
            throw new ArgumentOutOfRangeException("digits", Environment.GetResourceString("ArgumentOutOfRange_RoundingDigits"));
        }
        if ((mode < MidpointRounding.ToEven) || (mode > MidpointRounding.AwayFromZero))
        {
            throw new ArgumentException(Environment.GetResourceString("Argument_InvalidEnumValue", new object[] { mode, "MidpointRounding" }), "mode");
        }
        return InternalRound(value, digits, mode);
    }

    public static int Sign(decimal value)
    {
        if (value < 0M)
        {
            return -1;
        }
        if (value > 0M)
        {
            return 1;
        }
        return 0;
    }

    public static int Sign(double value)
    {
        if (value < 0.0)
        {
            return -1;
        }
        if (value > 0.0)
        {
            return 1;
        }
        if (value != 0.0)
        {
            throw new ArithmeticException(Environment.GetResourceString("Arithmetic_NaN"));
        }
        return 0;
    }

    public static int Sign(short value)
    {
        if (value < 0)
        {
            return -1;
        }
        if (value > 0)
        {
            return 1;
        }
        return 0;
    }

    public static int Sign(int value)
    {
        if (value < 0)
        {
            return -1;
        }
        if (value > 0)
        {
            return 1;
        }
        return 0;
    }

    public static int Sign(long value)
    {
        if (value < 0L)
        {
            return -1;
        }
        if (value > 0L)
        {
            return 1;
        }
        return 0;
    }

    [CLSCompliant(false)]
    public static int Sign(sbyte value)
    {
        if (value < 0)
        {
            return -1;
        }
        if (value > 0)
        {
            return 1;
        }
        return 0;
    }

    public static int Sign(float value)
    {
        if (value < 0f)
        {
            return -1;
        }
        if (value > 0f)
        {
            return 1;
        }
        if (value != 0f)
        {
            throw new ArithmeticException(Environment.GetResourceString("Arithmetic_NaN"));
        }
        return 0;
    }

    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Sin(double a);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Sinh(double value);
    [MethodImpl(MethodImplOptions.InternalCall)]
    private static extern unsafe double SplitFractionDouble(double* value);
    [MethodImpl(MethodImplOptions.InternalCall), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
    public static extern double Sqrt(double d);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Tan(double a);
    [MethodImpl(MethodImplOptions.InternalCall)]
    public static extern double Tanh(double value);
    public static decimal Truncate(decimal d)
    {
        return decimal.Truncate(d);
    }

    public static double Truncate(double d)
    {
        return InternalTruncate(d);
    }
}

 
Collapse Methods
 

scobra1w

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #55 on: January 19, 2010, 09:22:53 AM »
Here's one that I found worked really well.

8 Renoit + 2 Grapes

Online Metropolis Man

  • Tournament/Dynasty Coordinator
  • Administrator
  • Watcher
  • ******
  • Posts: 10201
Re: Share Your Nectar Making Recipes
« Reply #56 on: January 19, 2010, 10:33:17 PM »
Has anyone come up with a Flame Fruit recipe that does not include Life Fruit or the Rare Grapes? I'm trying to come up with a backup recipe in the upcoming nectar tourney and the best I found was 9FF/1Pomegranate on Extended Nectaration — $1600 for 5 bottles.



Registered members do not see ads on this Forum. Register here.

brunocbreis

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #57 on: January 23, 2010, 09:00:41 AM »
Yesterday I came up with an amazing recipe!
I don't think it's anywhere, but if it is, well, it's here too:
4 Plum
5 Gralladina Fran Grapes
1 Cranerlet Nuala Grape

Also, while trying some combinations out, I got a great one too:
5 Cranerlet Nuala Grapes
3 Cherries
2 Pomelos

Offline AriaGirl77

  • Watcher
  • ******
  • Posts: 1357
Re: Share Your Nectar Making Recipes
« Reply #58 on: January 24, 2010, 06:35:12 PM »
Anyone know any good recipes for Avornalino or Meloire grapes?  Seems like the only thing good to use them for is fertilizer.  :-\

Offline Eftyen

  • Townie
  • ***
  • Posts: 117
Re: Share Your Nectar Making Recipes
« Reply #59 on: January 25, 2010, 03:53:24 PM »
A question about the flavor code...

....  It then adds the median combo multiplier (fixed value set internally but modifiable) to the product of (the Max combo multipler minus the median combo multiplier) and the value computed above.

...

P.P.S. Code for determining value:
float baseValue = ((((((num * num2) * num4) * this.mFlavorMultiplier) * num7) * kQualityLevelMultiplier[((int) num5) - 1]) * this.mMultiplierFromFeet) * makeStyleValueModifier;

num = sum of the internal nectar values associated with all ingredients (for example, apple is 5, life fruit is 22 - this is regardless of quality)
num2 = Random Multiplier (although it's constrained to a range that's set by other constants)
num4 = skill multiplier
FlavorMultiplier = Whether the nectar maker is flavor upgraded (1 if not, more if it is)
num7 = the long "taste" multiplier i talked about at beginning of post
QualityLevelMultiplier & num5 = Multiplier based on quality of produce
MultiplierFromFeet = Flavorful feet multiplier (1 if regular feet, more if sim is challenged [pun intended])
MakeStyleModifier = Multiplier based on the kind of nectar you made (extended, concentrated, mass produce, etc.)

What is the min/max range for the random number used for num2 and what are the values of the Max Combo Multiplier and Median Combo Multiplier used in generating num7?  Does anyone know???  I'm trying to figure out the minimum theoretical recipe value based on ingredient values that could top the "9 Lives w/a Pomegranate" recipe.

Tremorchrist

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #60 on: February 02, 2010, 01:40:10 AM »
After a month or so of guest lurking this thread (and site) I've decided to contribute my recipe findings.  I don't have any amazing coding insight to add, but as someone who can't stand to let even normal quality fruit go to the vendor I hope I can share at least a couple of new great and amazing recipes to help out the other packrats among us.

These aren't necessarily high-value recipes, but I've found them useful in purging the myriad of lower-quality excess fruit I always end up with while working towards perfect for new plants.  Cheers!

Great:

3 Renoit
3 Meloire
2 Cranerlet Nuala
2 Gralladina Fran

3 Meloire
3 Cranerlet Nuala
2 Renoit
2 Gralladina Fran

3 Pomelo
3 Cherry
2 Avornalino
2 Flame Fruit

2 Plum
2 Cherry
2 Pomelo
2 Watermellon
1 Grape
1 Pomegranite

3 Renoit
3 Cherimola Blan
2 Plum
2 Pomegranite

3 Renoit
3 Plum
2 Cherimola Blan
2 Pomegranite

4 Gralladina Fran
3 Cranerlet Nuala
2 Flame Fruit
1 Life Fruit

4 Pomelo
3 Cherry
2 Pomegranite
1 Cranerlet Nuala


Amazing:

3 Cranerlet Nuala
3 Gralladina Fran
2 Renoit
2 Meloire

4 Renoit
3 Cherimola Blan
3 Avornalino

4 Pomelo
3 Meloire
3 Plum

2 Cherimola Blan
2 Cherry
2 Pomegranite
1 Pomelo
1 Gralladina Fran
1 Avornalino
1 Cranerlet Nuala

Offline Pam

  • Community Manager
  • Administrator
  • Watcher
  • ******
  • Posts: 15236
Re: Share Your Nectar Making Recipes
« Reply #61 on: February 02, 2010, 02:31:55 AM »
Welcome to our Forum, Tremorchrist!  I'm glad you've advanced from lurker to contributor.  :)

Thanks for sharing all these recipes.  I'm sure they will be very helpful to everyone!
Read and heed the Forum Rules, please!

Support the site when you purchase online!
Dreamweaver Immortal Dynasty
Dreamweaver 4 x 4 Dynasty
Pam's Sims 4 World Blog

"Half of my posts are correcting people. The other 49% is moving threads."

Offline Eftyen

  • Townie
  • ***
  • Posts: 117
Re: Share Your Nectar Making Recipes
« Reply #62 on: February 04, 2010, 09:27:57 PM »
A bit of math trivia, for anyone who's interested.

If you did OK in high school algebra, you might remember a calculator function that looks like "nCr".  That function is used to find the number of r-element combinations possible from a n-element set ("out of N, choose r things; ex. 10-fruit combinations from 16 total fruit).  This can be written as n!/(r!*(n-r)!).  Refresher: n! = n*(n-1)*(n-2)*(n-3)...*1 (ex. 4! = 4*3*2*1 = 24).  When you include repeatable choices, (like our nectar recipes!) this becomes ((n-1)+r)!/((n-1)!*r!), or in our case, (16-1+10)!/((16-1)!*10*), which is close to 3.3 million recipes!

(Information transcribed from Wikipedia "nCr" and "Combination" articles.)

kashiki

  • Guest
Re: Share Your Nectar Making Recipes
« Reply #63 on: March 12, 2010, 04:47:18 AM »
I just came on to this topic and it was fun reading all these recipes. ^^

I have one to give. I made 80% Cranerelet Nuala Grapes 20% Lime and with perfect quality for all fruits and it came out at a price of $345!

My first bottle over $300~

I was also thinking, it would be great to see the first post updated with all recipes and information on nectar making! ^^ Just a thought. :)

Offline samoht04

  • Building Contest Coordinator
  • Global Moderator
  • Watcher
  • ******
  • Posts: 9401
Re: Share Your Nectar Making Recipes
« Reply #64 on: March 12, 2010, 03:31:28 PM »
I think I had a really good one - 9 Plum and 1 Lifefruit. I think that's what it was. Oh wait, maybe it was flame fruit. I don't know, sorry!
Please read the Forum Rules![/center]

Offline Margerita

  • Immortal
  • *****
  • Posts: 736
Re: Share Your Nectar Making Recipes
« Reply #65 on: March 12, 2010, 08:10:58 AM »
I think I had a really good one - 9 Plum and 1 Lifefruit. I think that's what it was. Oh wait, maybe it was flame fruit. I don't know, sorry!
Thank you for the tip, I'll try both sometime and tell you which gave me the highest :P

Offline samoht04

  • Building Contest Coordinator
  • Global Moderator
  • Watcher
  • ******
  • Posts: 9401
Re: Share Your Nectar Making Recipes
« Reply #66 on: March 12, 2010, 12:35:52 PM »
My Sim used concentrated method I think, I am pretty sure it was Flame fruit but oh well.
Please read the Forum Rules![/center]

Offline Margerita

  • Immortal
  • *****
  • Posts: 736
Re: Share Your Nectar Making Recipes
« Reply #67 on: March 13, 2010, 10:43:53 AM »
Using none perfect fruits for both recipes, the one using flamefruit gave almost twice as much in base value. My sim used concentrated method and have completed the challenge that gives extra value to bottles.

So far my sims have discovered a pretty nice recipe not posted here. 5 Cranerlet Nuala Grapes - 3 Gralladina Fran Grapes - 2 Watermelon. Can't make any promises for taste but it has a rather nice value per bottle. :D

Offline samoht04

  • Building Contest Coordinator
  • Global Moderator
  • Watcher
  • ******
  • Posts: 9401
Re: Share Your Nectar Making Recipes
« Reply #68 on: March 13, 2010, 12:18:50 PM »
Next people will start saying Onion will work well!  ::)  ;D
Please read the Forum Rules![/center]

Offline Margerita

  • Immortal
  • *****
  • Posts: 736
Re: Share Your Nectar Making Recipes
« Reply #69 on: March 13, 2010, 01:33:34 PM »
Next people will start saying Onion will work well!  ::)  ;D
I've heard that onion part was a game bug that was removed, otherwise I'd run to the store for some :D

Offline Pam

  • Community Manager
  • Administrator
  • Watcher
  • ******
  • Posts: 15236
Re: Share Your Nectar Making Recipes
« Reply #70 on: March 13, 2010, 02:14:37 PM »
I believe you are correct, Margerita.  There was something about Sims getting a wish to use bizarre ingredients in nectar, like garlic.  This was corrected in a patch.
Read and heed the Forum Rules, please!

Support the site when you purchase online!
Dreamweaver Immortal Dynasty
Dreamweaver 4 x 4 Dynasty
Pam's Sims 4 World Blog

"Half of my posts are correcting people. The other 49% is moving threads."

Offline samoht04

  • Building Contest Coordinator
  • Global Moderator
  • Watcher
  • ******
  • Posts: 9401
Re: Share Your Nectar Making Recipes
« Reply #71 on: March 13, 2010, 02:29:48 PM »
I believe you are correct, Margerita.  There was something about Sims getting a wish to use bizarre ingredients in nectar, like garlic.  This was corrected in a patch.

Now I have heard Everything...  :o
Please read the Forum Rules![/center]

Offline PJSim

  • Immortal
  • *****
  • Posts: 750
  • It's a girl!
Re: Share Your Nectar Making Recipes
« Reply #72 on: March 13, 2010, 10:06:31 PM »
They wanted to use things like steak too. Too bad they couldn't actually do it. :D

Online Metropolis Man

  • Tournament/Dynasty Coordinator
  • Administrator
  • Watcher
  • ******
  • Posts: 10201
Re: Share Your Nectar Making Recipes
« Reply #73 on: March 13, 2010, 10:46:06 PM »
They wanted to use things like steak too. Too bad they couldn't actually do it. :D

Yeah, really. In the Bottomless Nectar Cellar article I wrote I could have had Zeus and Hera make rump roast nectar. Mmmm...mmmm...good! Of course, then they would have been the butt of Olympus. Oh, oh, my sides hurt!

Offline PJSim

  • Immortal
  • *****
  • Posts: 750
  • It's a girl!
Re: Share Your Nectar Making Recipes
« Reply #74 on: March 13, 2010, 10:59:39 PM »
Oh, oh, my sides hurt!

Well, I'm glad you can amuse yourself. It's a rare talent.

*shakes head*