Page 17 of 34 FirstFirst ... 7 15 16 17 18 19 27 ... LastLast
Results 161 to 170 of 334
  1. #161
    Player
    pandabearcat's Avatar
    Join Date
    Sep 2013
    Posts
    1,517
    Character
    Alizebeth Bequin
    World
    Brynhildr
    Main Class
    Dancer Lv 90
    Hello all, I'm wondering if anyone's tried the simulator and varied up the sample rotation I put? I'd like people to test to see if the script needs additional features in order for you to write your rotations. Also if there are any bugs or inconsistencies in the way it handles more complex priority lists.

    Furthermore, here is the source code for the "UI". As you can see it is extremely simple. Should people want to create their own graphical UI I welcome you to do so - all you need are hooks to the engine and parser's events and you're good to go. It simply isn't a big focus for me because the goal is to output the raw data people need to come to their own conclusions - if you want to use a graphic interface, if you want to export it to mathematica and do statistical analysis, go right ahead!

    Simply reference the needed dll (SimFF.dll and SimFF.Script.dll) and you're golden.

    Code:
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Windows.Forms;
    using SimFF;
    using SimFF.Script;
    using System.IO;
    using System.Diagnostics;
    
    namespace SimFF.UI
    {
        static class Program
        {
            static Engine eg;
            static Stopwatch timer;
            static StreamWriter sw;
            static TextWriter ow;
            static Boolean hasOutput;
            static double dps;
            /// <summary>
            /// The main entry point for the application.
            /// </summary>
            static void Main()
            {
                // print some menu crap (pshhhhh)
                Console.WriteLine("SimFF v0.4 (2015-06-30 release) (c) Cheng Chen");
                Console.WriteLine("Please view the README for license information.\n\n\n");
                Console.Write("Enter input script file: ");
    
                String input = Console.ReadLine();
    
                // setup grammar
                FFParser p = new FFParser();
    
                // parse the script file
                p.Parse(input);
    
                // get our engine
                eg = p.Context.Engine;
    
                // setup timer
                timer = new Stopwatch(); // trial time
                Stopwatch timer2 = new Stopwatch(); // total time
    
                // setup vars
                dps = 0;
    
                // attach handlers
                if (eg.Diagnostic)
                {
                    // only attach detailed handlers if diagnostic mode is on
                    // slows down performance drastically - will also output all
                    eg.RegisterDamageHandler(DamageHandler);
                    eg.RegisterAuraHandler(AuraHandler);
                    eg.RegisterAuraEndHandler(AuraEndHandler);
                }
                eg.RegisterTrialStartHandler(TrialStartHandler);
                eg.RegisterTrialEndHandler(TrialEndHandler);
    
                Console.WriteLine("Starting{1}Simulation ({0} Trials)\n\n", (eg.Diagnostic? 1 : eg.Trials), (eg.Diagnostic? " Diagnostic " : " "));
    
                // setup output
                FileStream fs = null;
                sw = null;
                ow = null;
    
                hasOutput = (p.Context.Output != null && p.Context.Output.Length > 0);
                if (hasOutput)
                {
                    fs = new FileStream(p.Context.Output, FileMode.Create, FileAccess.Write);
                    sw = new StreamWriter(fs);
                    ow = Console.Out;
                    Console.SetOut(sw);
                }
    
                // init and run
                timer.Start();
                eg.Run();
                timer.Stop();
    
                //cleanup
                if (hasOutput)
                {
                    Console.SetOut(ow);
                    sw.Close();
                    fs.Close();
                }
    
                //print end stuff
                Console.WriteLine("\nSimulation Complete {0} Trials. Time taken: {1}", eg.Trials, timer.Elapsed);
    
                // pause before program exit
                Console.ReadLine();
            }
    
            static void TrialStartHandler(TrialEventArgs e)
            {
                //
            }
    
            static void TrialEndHandler(TrialEventArgs e)
            {
                Console.WriteLine("Trial {0}: {3} dps\t{1} damage", e.TrialNumber, e.Damage, timer.Elapsed, e.Damage/e.Duration);
    
                dps += e.Damage / e.Duration;
    
                //print to console if output file
                if(hasOutput)
                {
                    Console.SetOut(ow);
                    Console.Write("\rRunning Trial {0} ({1}ms elapsed)\tAvg DPS {2}", e.TrialNumber, timer.ElapsedMilliseconds, (dps/e.TrialNumber).ToString("#.##"));
                    Console.SetOut(sw);
                }
            }
    
            static void DamageHandler(DamageEventArgs e)
            {
                Console.Write("[{0}]{4}\t{1}\t({2}{3})\n", eg.Time.ToString("#0.00"), e.Spell, e.Damage.ToString("#0.00"), (e.Crit ? "!" : ""), (e.Spell[e.Spell.Length - 1] == ')' || e.Spell.IndexOf("Autoattack") >= 0 ? "\t" : ""));
            }
    
            static void AuraHandler(AuraEventArgs e)
            {
                // discard system events
                if (e.Aura.Spell[0] == 'Z')
                    return;
                Console.Write("[{0}]\t\t\t{1} applied to {2}\t({3}sec)\n", eg.Time.ToString("#0.00"), e.Aura.Spell, e.Target.Name, e.Aura.Duration);
            }
    
            static void AuraEndHandler(AuraEventArgs e)
            {
                // discard system events
                if (e.Aura.Spell[0] == 'Z')
                    return;
                Console.Write("[{0}]\t\t\t{1} on {2} ends\n", eg.Time.ToString("#0.00"), e.Aura.Spell, e.Target.Name);
            }
        }
    }
    EDIT: I will attempt to put in the new lvl 60 formulas at some point today, though I am working on other tweaks at the moment. I am also pretty caught up in fourth of july stuff with friends and family, so likely not much work will be done until next week. Have a safe holiday.
    (0)
    Last edited by pandabearcat; 07-03-2015 at 12:01 AM.

  2. #162
    Player
    Dervy's Avatar
    Join Date
    Aug 2013
    Posts
    1,537
    Character
    Dervy Yakimi
    World
    Ragnarok
    Main Class
    Lancer Lv 80
    How do I compile this? I'm ultra scrub when it comes to computing languages/compiling/decompiling etc etc.
    (0)

  3. #163
    Player
    pandabearcat's Avatar
    Join Date
    Sep 2013
    Posts
    1,517
    Character
    Alizebeth Bequin
    World
    Brynhildr
    Main Class
    Dancer Lv 90
    You need visual studio 2010 (or higher). I think there is an "express" free version you can download. You need to create a new solution, add the UI source to the code, add the two necessary dll files as references (right click references, add, SimFF and SimFF.Script).

    You can then compile/build the project.

    There is a precompiled version on the first page downloads. I provided the code to this to let people see how to hook into the engine - if you want to make a GUI or something more advanced all the data and options you need are right there.
    (0)

  4. #164
    Player
    Dervy's Avatar
    Join Date
    Aug 2013
    Posts
    1,537
    Character
    Dervy Yakimi
    World
    Ragnarok
    Main Class
    Lancer Lv 80
    ((CRT-354)*0.0002330) + 0.0495080

    Critical Hit Rating Calculation. Everything got neutered, lmao.
    (0)

  5. #165
    Player
    HaroldSaxon's Avatar
    Join Date
    Feb 2014
    Posts
    637
    Character
    Harold Saxon
    World
    Odin
    Main Class
    Thaumaturge Lv 90
    Quote Originally Posted by Dervy View Post
    ((CRT-354)*0.0002330) + 0.0495080

    Critical Hit Rating Calculation. Everything got neutered, lmao.
    And I thought that gear differentiation before was bad...
    (0)

  6. #166
    Player
    Dervy's Avatar
    Join Date
    Aug 2013
    Posts
    1,537
    Character
    Dervy Yakimi
    World
    Ragnarok
    Main Class
    Lancer Lv 80
    Just go to the "How to Dragoon Per Second" thread, post 4 and check out the weightings. Just, lmao. Looks like a rat getting caught in a blender. It's nasty.

    Also, does the 0.0002330 multiplier fit your Critical Damage scaling data points Viridiana? (or resemble it at least)
    (0)
    Last edited by Dervy; 07-03-2015 at 11:10 PM.

  7. #167
    Player
    Viridiana's Avatar
    Join Date
    Mar 2011
    Posts
    3,481
    Character
    Aria Placida
    World
    Lamia
    Main Class
    Ninja Lv 88
    Quote Originally Posted by Dervy View Post
    Also, does the 0.0002330 multiplier fit your Critical Damage scaling data points Viridiana? (or resemble it at least)
    Fits pretty close to what I have so far, yeah. Got anything for the % damage, though?
    (0)

  8. #168
    Player
    Dervy's Avatar
    Join Date
    Aug 2013
    Posts
    1,537
    Character
    Dervy Yakimi
    World
    Ragnarok
    Main Class
    Lancer Lv 80
    It's roughly the same. Could you try ((CRT-354)*0.0002717)+1.4370748 and for any Data Points that don't fit properly, give me the Critical Hit Rating, and the min/max damage values with no crit + crit?

    EDIT: For Critical Hit Chance, use (((CRT-354)*0.0233018) + 4.9508) instead. Just makes it so it's a whole number %. Excel converts 10% to 0.1, for example, that's why the calculation was off (or you could multiply by 100)
    (0)
    Last edited by Dervy; 07-04-2015 at 12:25 AM.

  9. #169
    Player
    Viridiana's Avatar
    Join Date
    Mar 2011
    Posts
    3,481
    Character
    Aria Placida
    World
    Lamia
    Main Class
    Ninja Lv 88
    Quote Originally Posted by Dervy View Post
    It's roughly the same. Could you try ((CRT-354)*0.0002717)+1.4370748 and for any Data Points that don't fit properly, give me the Critical Hit Rating, and the min/max damage values with no crit + crit?
    Well, that fits pretty well (within rounding errors, basically). The only times I get things that don't match my observations is when there's an oddity in my observation (incomplete range or too much range).
    (0)

  10. #170
    Player
    Dervy's Avatar
    Join Date
    Aug 2013
    Posts
    1,537
    Character
    Dervy Yakimi
    World
    Ragnarok
    Main Class
    Lancer Lv 80
    Yeah well, the Critical Hit Damage Formula is pretty much like my own Damage Models. Heavily reliant on the numbers and rounding range. It's annoying, but not much else we can do really.

    Updated Crit Damage Formulae: ((CRT-354)*0.0002335)+1.448234

    Turns out the Critical Hit Damage and Critical Hit chance scaler is very close.
    (0)
    Last edited by Dervy; 07-04-2015 at 02:24 AM.

Page 17 of 34 FirstFirst ... 7 15 16 17 18 19 27 ... LastLast