[RELASE] Upgrade Simulator

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [RELASE] Upgrade Simulator

      Hello,
      Firstly, I want to say - It was really difficult to choose forum section for creating this thread! Finally I decided to post it there because I think the programming is kind of art ~

      That thread will serve me to share Upgrade Simulator and keeping it up to date. Software will be attached in attachments section of this post!

      Now I'm using C++ language without gui (just console) so it may work only on Windows OS. Maybe in future I will redesign it for JAVA or C#
      To make a gui I will need original graphics from game and a lot of time ~

      FINALLY! IT IS COMPLETED (RELASE)!

      Version [3.2C] ENG
      Version 3.2C ENG


      Working:
      -Creating items menu
      -Random item name when typing too many or too few characters
      -Database
      -Deleting exisiting items
      -Rebuilded database and structure
      -Added upgrade menu (Now fully working)
      -Fixed database saving functions
      -Chance upgrade ratio in % !
      -Fully working upgrading system:
      -Better simulation: master formula chances for +1~3 - thanks AncientCompiler for original source code
      -Better simulation: tincure % on fail to downgrade 0~2 - thanks AncientCompiler for original source
      -Sorting functions (Quicksort) *NEW*
      -Auto refresh *NEW*
      -Remade console UI to more beauty. *NEW*
      -Fixed bug which was downgrading item below +11,+15,+19 even if used tincs *NEW* - thanks for starguradianjan
      -Fixed many bugs which were part of 2.0C and 3.1C version! *NEW*
      -Rebalanced score system at minigame! *NEW*
      -Fixed 3.1C challenge upgrade chance formula *NEW*

      Added:

      • Serendipity Potions (100%-300%)
      • Survival Tincture , Medium Tincture, Greater Tincture
      • Buffs purification
      • Refresh button
      • Apperentice's Formula
      • Assistant's Formula
      • Master's Formula
      • Scroll of Reflection





      -Little upgrade minigame: *NEW*

      minigame_parts

      • level system
      • Ancient and Challenge mode
      • multiplier ratio (part of level system)
      • titles system *NEW*
      • points system *NEW*
      • scoreboard system *NEW*
      • the game relase *NEW*
      • Rebalanced score system *NEW*




      ToDo:
      -Deleting existing item menu (it's sketched)
      -Upgrade menu
      -Fix of database when deleting (file is not saved)
      -Upgrading functions best as is possible
      -Better simulation: master formula chances for +1~3 (Needs devs support)
      -Better simulation: tincure % on fail to downgrade 0~2 (Needs devs support)
      -Little upgrade minigame:

      minigame_parts

      • scoreboard system
      • level system
      • Ancient and Challenge mode
      • points system
      • multiplier ratio (part of level system)
      • titles system
      • the game relase
      • Balance score results between Challange and Ancient mode (AT TESTING)

      -Sorting functions (Quicksort)
      -Removing [R] refresh button and setting up autorefresh.
      Remaking console UI to more beauty.
      -Fixing bug which is downgrading below +11,+15,+19 from one plus upper if using tincs - thanks for starguradianjan
      -Achivements system I think it's not good idea at all
      -Searching for bugs (Please report all issues at this thread!) - CHECKED REALSE 3.2C WORKING AT 99.9% (Please report all bugs , I have checked as many as I could!)




      -Add sounds (Needs devs support)
      -Rewrite to Java/C# and making gui (Needs devs support)
      Files
      • relase-3.2C.zip

        (299.7 kB, downloaded 495 times, last: )

      The post was edited 35 times, last by iomatix ().

    • It's still pre relase, please open spoiler and read this section.
      Now only create button working ^^ ~
      I will add working deleting section at next update ~
      Upgrade will be after that :D

      Peace!

      EDIT:

      Updated:
      Now deleting working too :v

      Started creating upgrade menu and upgrade without potions (for now)

      The post was edited 2 times, last by iomatix ().

    • Hello iomatix!

      We apreacciate fan made tools and we'll support you with some formulas:

      Calculating if it fails or not:

      Calcprob function
      Display Spoiler

      C Source Code

      1. BYTE CalcProb(BYTE bBaseProb)
      2. {
      3. WORD wAddProb = bBaseProb;
      4. wAddProb += bBaseProb * (Chance of item upgrade event example : 35) / 100;
      5. WORD wAdd = (Potion of fortune example 300 for x3)
      6. if(wAdd)
      7. {
      8. wAddProb += bBaseProb * wAdd / 100;
      9. EraseItemProbBuff(SDT_STATUS_ITEMUPGRADE); //Delete Potion
      10. }
      11. wAddProb += bBaseProb;
      12. return min(wAddProb, 100);
      13. }
      Display All




      Calc the chance/Calc the effect/Delete Buffs/Calc how many +
      Display Spoiler

      C Source Code

      1. BYTE bChance = "Chance of the current upgrade level, 5(%) for example..."
      2. BYTE bRand = BYTE(rand() % 100);
      3. BYTE bProb = CalcProb(bChance);
      4. if(bRand < bProb) // Success
      5. {
      6. //Calc how many grades are going to be added
      7. BYTE bGrade = bItemGrade == 3 ? BYTE(rand() % 3) + 1 : 1;
      8. pItem->m_bLevel += bGrade;
      9. if(pItem->m_bLevel >= 17 && pItem->m_bGradeEffect == 0)
      10. pItem->m_bGradeEffect = BYTE(rand()% (IE_COUNT-1) ) + 1; //Calc new effect
      11. if(pItem->m_bLevel > 24)
      12. pItem->m_bLevel = 24;
      13. if(pItem->m_bLevel > 15) //Calc bonuspoints for above +15
      14. {
      15. BYTE bAddBonus = BYTE(rand() % 3) + 1;
      16. _AtlModule.DoCashBonusTransaction(pPlayer->m_dwUserID, 0 , bAddBonus, 1);
      17. }
      18. /*[..........]*/
      19. }
      20. else //fail
      21. {
      22. if("has tincture")
      23. {
      24. BYTE bLevelGuard = 11;
      25. BYTE bDownProb = 0;
      26. BYTE bDownGrade = 0;
      27. if(pItem->m_bLevel <= bLevelGuard)
      28. bDownProb = 0;
      29. else
      30. bDownProb = rand() % 100;
      31. if(bDownProb < 20)
      32. bDownGrade = 0;
      33. else if(bDownProb < 55)
      34. bDownGrade = 1;
      35. else
      36. bDownGrade = 2;
      37. if(pItem->m_bLevel > bLevelGuard && pItem->m_bLevel - bDownGrade < bLevelGuard)
      38. bDownGrade = pItem->m_bLevel - bLevelGuard;
      39. if(bDownGrade)
      40. {
      41. pItem->m_bLevel = pItem->m_bLevel > bDownGrade ? pItem->m_bLevel - bDownGrade : 0;
      42. if(pItem->m_bLevel < 17) // Delete effect if it fails to below +17
      43. pItem->m_bGradeEffect = 0;
      44. }
      45. }
      46. else
      47. {
      48. //Delete item
      49. }
      50. }
      Display All


      Hope it does help you :)
    • AncientCompiler wrote:

      Hello iomatix!

      We apreacciate fan made tools and we'll support you with some formulas:

      Calculating if it fails or not:

      Calcprob function
      Display Spoiler

      C Source Code

      1. BYTE CalcProb(BYTE bBaseProb)
      2. {
      3. WORD wAddProb = bBaseProb;
      4. wAddProb += bBaseProb * (Chance of item upgrade event example : 35) / 100;
      5. WORD wAdd = (Potion of fortune example 300 for x3)
      6. if(wAdd)
      7. {
      8. wAddProb += bBaseProb * wAdd / 100;
      9. EraseItemProbBuff(SDT_STATUS_ITEMUPGRADE); //Delete Potion
      10. }
      11. wAddProb += bBaseProb;
      12. return min(wAddProb, 100);
      13. }
      Display All



      Calc the chance/Calc the effect/Delete Buffs/Calc how many +
      Display Spoiler

      C Source Code

      1. BYTE bChance = "Chance of the current upgrade level, 5(%) for example..."
      2. BYTE bRand = BYTE(rand() % 100);
      3. BYTE bProb = CalcProb(bChance);
      4. if(bRand < bProb) // Success
      5. {
      6. //Calc how many grades are going to be added
      7. BYTE bGrade = bItemGrade == 3 ? BYTE(rand() % 3) + 1 : 1;
      8. pItem->m_bLevel += bGrade;
      9. if(pItem->m_bLevel >= 17 && pItem->m_bGradeEffect == 0)
      10. pItem->m_bGradeEffect = BYTE(rand()% (IE_COUNT-1) ) + 1; //Calc new effect
      11. if(pItem->m_bLevel > 24)
      12. pItem->m_bLevel = 24;
      13. if(pItem->m_bLevel > 15) //Calc bonuspoints for above +15
      14. {
      15. BYTE bAddBonus = BYTE(rand() % 3) + 1;
      16. _AtlModule.DoCashBonusTransaction(pPlayer->m_dwUserID, 0 , bAddBonus, 1);
      17. }
      18. /*[..........]*/
      19. }
      20. else //fail
      21. {
      22. if("has tincture")
      23. {
      24. BYTE bLevelGuard = 11;
      25. BYTE bDownProb = 0;
      26. BYTE bDownGrade = 0;
      27. if(pItem->m_bLevel <= bLevelGuard)
      28. bDownProb = 0;
      29. else
      30. bDownProb = rand() % 100;
      31. if(bDownProb < 20)
      32. bDownGrade = 0;
      33. else if(bDownProb < 55)
      34. bDownGrade = 1;
      35. else
      36. bDownGrade = 2;
      37. if(pItem->m_bLevel > bLevelGuard && pItem->m_bLevel - bDownGrade < bLevelGuard)
      38. bDownGrade = pItem->m_bLevel - bLevelGuard;
      39. if(bDownGrade)
      40. {
      41. pItem->m_bLevel = pItem->m_bLevel > bDownGrade ? pItem->m_bLevel - bDownGrade : 0;
      42. if(pItem->m_bLevel < 17) // Delete effect if it fails to below +17
      43. pItem->m_bGradeEffect = 0;
      44. }
      45. }
      46. else
      47. {
      48. //Delete item
      49. }
      50. }
      Display All


      Hope it does help you :)
      Yep It will be very helpfull! :D


      Edit:
      Lol it's much simplier that i thought :O
      it's 1/3 to get 1 ,2 or 3 grades ... I made diffrent % to Aassistant's and Master's Formulas :o ~ so I will remake it to original, only will keep that for minigame :O

      Checking now all values and...
      ...And I made by my intuition really simillar chances :O
      for example: on 4ancient is 20% to keep upgrade on fail, I made 22% x'D ~ I will correct it :D

      The post was edited 2 times, last by iomatix ().

    • AncientCompiler wrote:

      I can recommend you to use MFC for the GUI if you want to keep it in C++.
      I prefer Java/C# because it's faster :o

      MFC lib isn't part of Visual Cpp? Is it free?

      Anyway I want to make true 4story gui and will need png for buttons invetory etc. I'll make it maybe in future now I'm about to adding minigame (score attack) and then sounds (again I need .wav upgrading audio from game)
    • SlaveToTheRhythm wrote:

      ah I thought the simulator would be for the game
      It is! These options are if you just want to keep your item on upper + !

      They will be removed in score attack minigame :P
      In that mode you will have also fixed items quantity depends on level which you have choosen! :D

      And there will be also Vanilla Challange mode too with old original upp rates (to +24) but you can reach max +28.
      Better tincs will be available :o

      level system will work that:
      When harder level you will choose the scores will be higher but you will get less items to upgrading.
      There will be Hardcore mode (true simulation) where you won't get items when successfull upgrading. (That mode will have some options too, you may choose how many items you wanna get on start (more = lesser score multiplier)

      The post was edited 3 times, last by iomatix ().