Page 2 of 3 FirstFirst 123 LastLast
Results 21 to 40 of 46
  1. Proton

    IGN: BuddyAran
    Server: Cassopeia
    Level: 115
    Job: Aran (13/02/11)
    Guild: Not telling
    Alliance: Not telling also
    malaysia

    Default


    Must be a Nexon-made function file....

    I don't think I've seen this function in C++, or is it?

  2. Default


    I'm wondering, can you get potential info out of there?
    Specifically how cubes work?
    As in: chance to change the grade from rare to epic or unique, and if it can change from 2 to 3 bonuses?

  3. Water

    IGN: MysticHLE
    Server: Broa
    Level: 18x
    Job: Paladin
    Guild: VincitOmnia
    Alliance: Sonata
    usa

    Default


    Wow...really?! Switch statements?! That many conditions as well?! I really wonder what kind of beginner programmers they hire to code these things. These developers should know better. -_-!

    The computer isn't going to like this in terms of performance. And there isn't much that the assembler will be able to do either...way too many potential branch prediction misses (on the architecture level). >.>

    I sure hope this function isn't invoked each time we attack...and that it's only calculated once. -_-

    Kinda explains why MS runs so slow and requires so much resources...if they really have these bad programming habits. >.>

    It definitely doesn't look like a function in the STL library, so it must be a user-defined function - which shouldn't be a surprise to you - since that's what programming is essentially about. STL is mainly only used for the containers/ADTs.

  4. Default


    Uhhh, switch statements run VERY FAST. Even faster than if statements. Switch is better here because there are a limited number of options that exist in easily ascending order. When it's like this, the assembly XORs a single digit and knows exactly where to JMP. An if-then structure would require, worst case, 20 CMPs. On top of that, switches are easier to maintain (though Nexon clearly doesn't take advantage of it).

    In short, Switch statements when using a branch table run in O(1) time. If statements run in O(n) time.

  5. Default


    You'd be amazed how much faster KMS is than GMS.

  6. Default


    Precisely, their attack calculations and such are worst. They should simply pre-calculate it and cache on a location for future attack, and update when the user cast a buff/debuff.
    You'll see hundreds of if and else such as :

    Code:
    if (skillid / 1000 == 100) {
       if (skillid == 1311111) {
       } else if .. and so on
    }
    THIS repeats for every single job! lol

    AND their randomizer does this 7~15 times per attack to an array :
    Code:
    CRand32_Rand() // Generate an unsigned int32
    even without using it fully.

  7. Default


    What do you expect them to use? If statements?

    As Fiel said, switch statements run faster than if.

    If you try to optimise this in code it'll be premature optimisation. What ZakumSlaYers said above can be optimised further. Optimising this further would become premature optimisation.
    Last edited by AngelSL; 2010-07-25 at 12:54 AM.

  8. Default


    It's only premature optimization if you optimize before writing the code - this is just poor optimization. Regardless, I think we're getting a bit off topic.

  9. Default


    Just wondering: Is there a list of drops in that file somewhere?

    No matter how unlikely, I'm still hopeful. >.>

  10. Default


    No. All that does is deobfuscate the clients code.
    Drops are server side.

  11. Proton

    IGN: BuddyAran
    Server: Cassopeia
    Level: 115
    Job: Aran (13/02/11)
    Guild: Not telling
    Alliance: Not telling also
    malaysia

    Default


    uuum, off topic: I'm sure there's a pros and cons when using 'if' and 'switch' statement right?

  12. DUCKS
    IGN: Mondays
    Server: Bellocan
    Level: 170
    Job: White Knight
    Guild: Affinity
    Alliance: Honour
    norway

    Default


    Python-simplification of the code, if you consider CalcDamage__CalcDamageByWT, _ZtlSecureFuse and _calc_base_damage as blackboxes:
    Spoiler


    If vs. Switch: Switch can only be used with constant values in all languages I know of (unless you use JIT and some hocus-pocus), so it has a rather big limitation that way. The difference between them speed-wise is premature optimization: It'll not be your bottleneck.

  13. Default


    Not really. It's more about the right tool for the right situation, one is always inherently better for specific things. When you're evaluating a single numeric value for multiple conditions for example, switch always wins.

  14. Default


    Always begin writing code in a style that has the best readability first, optimization comes last.

    In terms of performance, switch statements has the advantage of comparing multiple values to the same value over and over again. This task is trivial in machine code and the compiler will take advantage of that. "If / else if" statements do not restrict comparison to a single value against multiple values. When turned into machine code, each comparison would require loading a different value into the registers before comparing the registers, whereas the switch statement only loads the value to be checked into the register once at the beginning and reuses it to compare to other values.

    Then again, if you're using "if / else if" blocks in a way that always compare the same variable to other values, modern compilers are smart enough to optimize it into the same code that you would have gotten with a switch statement anyway. So, go with whichever one that gives the best readability according to situation.

  15. GLADIGATORS
    IGN: Overburnd
    Server: Khaini
    Level: 210
    Job: Cannoneer
    Guild: Contagious
    usa

    Default


    Is it possible to derive all cast times and delays from the client paul?

  16. Default


    All delays are in the WZ files, so it's not really necessary to gather them from the client. The useful thing will be the calculation which determines how booster affects delays.

  17. Default


    really helpful to my bigbang damage simulator.
    and it tells me how "round" works

    How to extract the skill delay from wz file? Is it in skill.wz? or character.wz?
    to give an example and I'll appreciate it

  18. Default


    This'll just be my "post random stuff I find" thread.

    Determining Item Level and the EXP:

    Item EXP to level is determined by the Item's level which is sent to the "get level exp" function. So if an item is level 60, the game figures out what the exp tnl is from 60 to 61. The game then multiplies this value by the exp value given in the WZ files, then divides by 100.

    As a formula...

    itemEXPTNL = get_exp_tnl(ItemLevel) * get_item_exp_multiplier(itemClass) / 100.0

    So it's much harder to get a level 120 reverse weapon to level up than, say, a level 50 item.

  19. Default


    Found firing delays in the EXE. It's hard coded.

    That one Hermit Skill where you throw money = 120
    Bowman Strafe = 60
    Sniper Strafe = 60
    Wind Archer Strafe = 60
    Wild Hunter Five Shot = 60
    Wild Hunter Hurricane = 60
    Bowmaster Hurricane = 120
    Lucky 7 = 240
    Triple Throw = 240

    These speeds are not affected by booster.

    Speaking of booster, I also found the formula where booster is calculated. The max speed is still 2, and the slowest speed is still 10. It looks like booster does not affect Bloody Storm or Flying Assaulter.

    The booster formula looks something like this --> (var * (10 - boosterLevel) * 0.01)

  20. Neon Atom
    IGN: FluffyFoxxie
    Server: Bera
    Level: 18X
    Job: Marxman
    Guild: RedShift
    Alliance: Purified
    usa

    Default


    Did you mean to say those skills CANNOT be affected by booster, or that those are the speeds WITHOUT booster. The wording makes it unclear and worries me, cuz having SI with ultistrafe seems godly, and I'd rather not lose that ability :( lol

  21.  

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •