Enchant/SC Sim - Dragon Saga Community Chat - WarpPortal Community Forums

Jump to content


Photo
- - - - -

Enchant/SC Sim


  • Please log in to reply
41 replies to this topic

#1 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 06 May 2011 - 03:25 PM

Got bored so I coded an enchant/SC simulator in java. You can download the latest version here. After extracting, run the .bat file to start the sim.

Features:
  • Create items with any name
  • Success rates are based on this
  • Going back to the main menu creates the same effect as reopening the enchant/sc window
  • No GUI since I'm too lazy to code one
  • Can choose which rose you want to use to soulcraft with
  • Default enchant rate includes the 2% medal. You can choose if you wish to add the patch of love and the castle success rates.
  • Upon successful enchant/sc, you will see how many tries you took
  • No souls or enchant dusts needed!
  • At the sc/enchant window, pressing enter will automatically choose your last input. This way, you don't have to reenter your input every try.
About item creation:
  • Item names cannot contain commas
  • Valid inputs for slot are the following: weapon, head, top, bottom, pads, gloves, shoes, back, neck, ring, earring, belt, shield. Note that the success rate of enchanting a weapon is lower than the rate of enchanting an armor piece, based on the rates provided on IAH.
That's about it. If you find any bugs that need fixing, let me know. If I'm not feeling lazy, I may add more features such as actually displaying a stat upon successful soulcrafts. With that, there will also be the option of reducers and maybe randomizers. This is currently in the code, but it is not yet fully implemented. Depending on how complex the system is, since I have to account for item levels and such, I may or may not add in these features. If anyone wants to create a database of in game items, I may add that in as well. Creating a GUI that mimics the game's actual interface is on the to-do list as well, but it takes more time than I would like to spend on this at the moment. Again, these are tentative features and I have no obligation to add them.

http://tinyurl.com/escsim if you want to spread the link more easily.

Changelog ( Updates | Bugfixes | Bugs )
v0.0.04
- Fixed 5% rose success count bug
- Reworked success rate formulas (should be more noticeable with soul crafting)

@Bug: Item creation with invalid slot will be treated as armor instead of giving an error

v0.0.03
- Added short pause to successful enchants to prevent spamming out your achievement.
@Bug: Item creation with invalid slot will be treated as armor instead of giving an error
@Bug: 5% rose does not include successful attempt in the count (fixed in next ver)

v0.0.02
- Pressing enter at the main menu no longer prints the menu again.
v0.0.01
- Creation of initial program.

Edited by Yurai, 07 May 2011 - 12:33 AM.

  • 4

#2 fyerolight

fyerolight

    Awarded #1 Troll

  • Members
  • 525 posts
  • LocationPuerto Rico
  • Playing:Dragon Saga
  • Server:Vyvern

Posted 06 May 2011 - 06:53 PM

Wow, this is amazing. Awesome job!
  • 0

#3 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 07:34 PM

Will there be an Emporia Soulcraft bonus?
  • -1

#4 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 06 May 2011 - 07:35 PM

Will there be an Emporia Soulcraft bonus?


Emporia does not give soulcraft success rate.
  • 0

#5 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 08:12 PM

Emporia does not give soulcraft success rate.

Aye, wrong bonus, sorry.
  • 0

#6 ImDiene

ImDiene

    Awarded #1 Troll

  • Members
  • 612 posts
  • LocationYurai's <3
  • Playing:Dragon Saga

Posted 06 May 2011 - 08:49 PM

WOW I LEGEND IN 20 TRIES WITH NO ROSE. I WISH DRAGONSAGA WAS LIKE THIS

WTF 285 TRIES TO +13 WITH CASTLE

1532 TRIES TO +18
THIS CASTLE SUCKS

149 tries to 19 not bad..

386 tries to 20 sigh

Edited by ImDiene, 06 May 2011 - 08:56 PM.

  • 0

#7 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 09:06 PM

WOW I LEGEND IN 20 TRIES WITH NO ROSE. I WISH DRAGONSAGA WAS LIKE THIS

WTF 285 TRIES TO +13 WITH CASTLE

1532 TRIES TO +18
THIS CASTLE SUCKS

149 tries to 19 not bad..

386 tries to 20 sigh

I had very similar results.
  • 0

#8 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 09:11 PM

Found a bug (Enchant to Legend 0 tries):

Posted Image


Edit: Also, how are you generating your random numbers?

Edited by Miname, 06 May 2011 - 09:18 PM.

  • 0

#9 fyerolight

fyerolight

    Awarded #1 Troll

  • Members
  • 525 posts
  • LocationPuerto Rico
  • Playing:Dragon Saga
  • Server:Vyvern

Posted 06 May 2011 - 09:24 PM

The results i remember the most were 16 (2 tries), 19 (863 tries), and 20 (308 tries)
For SC adv 4? tries, spec 42, arti 10. (Forgot legend)
  • 0

#10 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 06 May 2011 - 09:53 PM

Found a bug (Enchant to Legend 0 tries):

Posted Image


Edit: Also, how are you generating your random numbers?

Yeah, I noted that bug in the change log. It's already fixed, but I don't want to recompile it yet. Random numbers are seeded with the current system time, and the rng is fed a new seed upon accessing the main menu.

Post any suggestions/bugs and I'll get to them whenever I can. Keep in mind that I'm keeping functionality as the main priority as opposed to having a GUI. Ideas on efficient ways to implement soulcraft options would be appreciated as well. If anyone has algorithms for calculating soulcraft stats on an item of a specific level, it would help a lot. There are some easy ones, but some of them, such as critical damage on backs and weapons, aren't so obvious. The 1.6% increase in aim soulcraft option on backpieces from lvl 54 to 60 has been bugging me for a while, too.

Edited by Yurai, 06 May 2011 - 10:02 PM.

  • 0

#11 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 10:41 PM

Yeah, I noted that bug in the change log. It's already fixed, but I don't want to recompile it yet. Random numbers are seeded with the current system time, and the rng is fed a new seed upon accessing the main menu.

Hmm, I was wondering about that. Empirically, I was getting worse rates the more I held down enter instead of pausing between every try, so idk if it was a problem with the seed (sys time not changing fast enough) or just coincidence.
  • 0

#12 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 06 May 2011 - 11:04 PM

Hmm, I was wondering about that. Empirically, I was getting worse rates the more I held down enter instead of pausing between every try, so idk if it was a problem with the seed (sys time not changing fast enough) or just coincidence.


I'll look into it, but the rate at which you enchant/sc should not be affected by the delay between each. The output given by a specific seed should always remains constant, regardless of the waiting interval in between.
  • 0

#13 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 11:08 PM

I'll look into it, but the rate at which you enchant/sc should not be affected by the delay between each. The output given by a specific seed should always remains constant, regardless of the waiting interval in between.

I figured that, guess my luck is just bad Q_Q
  • 0

#14 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 06 May 2011 - 11:22 PM

I figured that, guess my luck is just bad Q_Q


Okay, I figured out my problem. Turns out to be something really stupid. I'll take this chance to rework the algorithm while I'm at it.

Edited by Yurai, 06 May 2011 - 11:22 PM.

  • 0

#15 ImDiene

ImDiene

    Awarded #1 Troll

  • Members
  • 612 posts
  • LocationYurai's <3
  • Playing:Dragon Saga

Posted 06 May 2011 - 11:38 PM

legend in 15 tries while holding enter with no rose np

lol changed from castle to no patch and got +18 in 4 tries

Edited by ImDiene, 06 May 2011 - 11:41 PM.

  • 0

#16 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 06 May 2011 - 11:43 PM

Okay, I figured out my problem. Turns out to be something really stupid. I'll take this chance to rework the algorithm while I'm at it.

Ooh, can you tell me/PM me what the problem was?
Just plain curiosity :P

Edited by Miname, 06 May 2011 - 11:43 PM.

  • 0

#17 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 07 May 2011 - 12:04 AM

First post updated with newer version. Basically, due to some carelessness, the success rate increase options never worked properly. It was always using the same default success rate no matter which option you chose.
  • 0

#18 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 07 May 2011 - 12:17 AM

First post updated with newer version. Basically, due to some carelessness, the success rate increase options never worked properly. It was always using the same default success rate no matter which option you chose.

Oh, haha. Well I'd be lying if I said I haven't been the victim of extreme carelessness with coding, myself.
  • 0

#19 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 07 May 2011 - 12:37 AM

v0.0.04:
Minor bug but while holding down enter to spam SC and Enchant, succeeding cause the program to pause but then another attempt will occur immediately after.

If I could recommend a feature, saving and loading a list of gear from a file would be cool. Java has a nice way of opening files and parsing/tokenizing strings. Also maybe outputting successes and the attempt numbers to a log file. If you're ambitious enough, you could also output to an excel file.
That would be super useful for compiling data on average success/fail rates at a given SC/Enchant level.

Edited by Miname, 07 May 2011 - 12:41 AM.

  • 0

#20 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 07 May 2011 - 12:43 AM

v0.0.04:
Minor bug but while holding down enter to spam SC and Enchant, succeeding cause the program to pause but then another attempt will occur immediately after.

If I could recommend a feature, saving and loading a list of gear from a file would be cool. Java has a nice way of opening files and parsing/tokenizing strings.
That would be super useful for compiling data on average success/fail rates at a given SC/Enchant level.


Not sure if I can fix that first one. I put the thread immediately to sleep upon a successful enchant, but the input still goes through. It's a lot better running in the command prompt as opposed to the eclipse console, where it reads a lot more input.

Elaborate a little more on the saving and loading part. I can implement it easily, but I'm not sure exactly what type of data you want to save, as well as whether or not you want to specify user input to access save/load functions.

Going to sleep now, though, so at earliest, I'll work on it more tomorrow.

Edited by Yurai, 07 May 2011 - 12:43 AM.

  • 0

#21 Miname

Miname

    Too Legit To Quit

  • Members
  • 2187 posts
  • LocationDefinitely in my zone
  • Playing:Dragon Saga
  • Server:Spamonica

Posted 07 May 2011 - 12:56 AM

Not sure if I can fix that first one. I put the thread immediately to sleep upon a successful enchant, but the input still goes through. It's a lot better running in the command prompt as opposed to the eclipse console, where it reads a lot more input.

Elaborate a little more on the saving and loading part. I can implement it easily, but I'm not sure exactly what type of data you want to save, as well as whether or not you want to specify user input to access save/load functions.

Going to sleep now, though, so at earliest, I'll work on it more tomorrow.


Lets say that I want to test out the average amount of tries going from a given rate (say, +16 -> +17), it would be easy to load those specifications from a file than creating new items over and over again. Or instead of dealing with file IO, perhaps it would be possible to add an option for the user to pass parameters to the item constructor that allows a specific item grade/enchant level. Basically just something that allows for testing a specific action repeatedly with minimal setup time.
Edit: or maybe a re-roll function that allows you to try the same e/sc gamble again.

Good job on the program so far though, its coming along nicely.

Edited by Miname, 07 May 2011 - 04:26 AM.

  • 0

#22 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 07 May 2011 - 09:54 AM

Lets say that I want to test out the average amount of tries going from a given rate (say, +16 -> +17), it would be easy to load those specifications from a file than creating new items over and over again. Or instead of dealing with file IO, perhaps it would be possible to add an option for the user to pass parameters to the item constructor that allows a specific item grade/enchant level. Basically just something that allows for testing a specific action repeatedly with minimal setup time.
Edit: or maybe a re-roll function that allows you to try the same e/sc gamble again.

Good job on the program so far though, its coming along nicely.


Seems more reasonable to create allow users to pass an enchant/sc grade. Editing input files isn't exactly user friendly and would require specific formats that people may ignore. I was thinking of an auto save/load to generate statistics, such as average amount of tries for an enchant, as well as the most fails/least tries per grade. It may take a while though, since I have a couple finals coming up and I'd need to make the program handle more information that I have it currently set to.
  • 0

#23 Slayze

Slayze

    Amateur Blogger

  • Members
  • 209 posts

Posted 07 May 2011 - 11:48 AM

You have way too much time on your hands.

*downloads*

Match, when?
  • 0

#24 Yurai

Yurai

    Too Legit To Quit

  • Members
  • 2917 posts
  • Playing:Pogo's Lounge

Posted 07 May 2011 - 12:29 PM

You have way too much time on your hands.

*downloads*

Match, when?


I'll be done with my finals on Thursday, so some time after that. I only made this because I got stuck on some bug in my other program for an hour so I figured I'd take a break and program something else. I don't think this took as long as you seem to think it took lol.

Edited by Yurai, 07 May 2011 - 12:33 PM.

  • 0

#25 Kazu731

Kazu731

    Too Legit To Quit

  • Members
  • 3347 posts
  • LocationSky Garden
  • Playing:Dragon Saga
  • Server:Sky Garden

Posted 08 May 2011 - 05:22 AM

THIS IS AWESOME

Thanks!
  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users