Skip to content

KimDebroye/EPW-Recaster

Repository files navigation

EPW Recaster

Overview

Download

[ Latest & Older Versions ]


In a nutshell

EPW Recaster is a tool that

  • automates recasting EPW weapons & gears (armors)
  • using Optical Character Recognition and
  • user-configurable search conditions.

EPW Recaster does not rely on nor uses any kind of game hook.
It solely relies on what is captured using OCR and performs
programmatical choices & actions based on captured results.

Compatibility Note

  • This tool has been confirmed to work on other servers as well (Relentless, ...).

TL;DR Version 3.1 QuickStart

Video Demonstration Useful ReadMe Links
EPW Recaster ~ Demonstration Video 🔽 Setup & Prerequisites
🔽 Main Setup Form
🔽 Comparative Condition Examples
🔽 FAQ
🔽 Contact | Feedback

Setup

  • Extract the contents of the provided package
    to any folder that has write privileges.
    ( f.e. Desktop | C:\Apps\EPW Recaster | ... )
  • Launch EPW Recaster(.exe).

❗ Additional Setup Prerequisites ❗

[ (Show|Hide) Additional Setup Prerequisites ]

  • This tool may require administrative privileges due to low-level actions used
    ( f.i. moving/clicking mouse, ... ).
    • Steps to check/enable administrative privileges :
      • Right-click EPW Recaster(.exe) and
        choose Properties.
      • In Compatibility tab,
        check ☑ Run this program as an administrator
        and confirm by clicking OK.
  • This tool requires Windows Display Scaling to be set to 100%
    for a correct screen capture behavior
    .
    • Steps to check/change Windows Display Scaling
      ( Windows 10 / Other Windows versions: use Google ) :
      • Right-click anywhere on desktop and
        choose Display Settings.
      • Make sure the Scale and layout setting is set to 100% and
        close the window.
        Windows 10 Display Scaling

Sections

Sections

General Notes

  • Once a preview or an auto-roll is started, the main form will be programmatically minimized and restored after.
    ( The main form is mainly used for setup purposes only. )
  • On the other hand, the info form will always stay on top of all windows.
  • All changes are automatically stored and restored upon relaunch.
  • Using any kind of text editor, theming options can be altered in
    .\Config\ThemeColorStyle.cfg (includes additional comments).

1. ( Main ) Setup Form


1-1. See-through Region

See-through Region

  • When launching EPW Recaster for the first time
    ( and/or whenever the in-game location of the recast
    a.k.a. reshape/manufacture window is changed
    ),
  • move the tool around and resize using the size grip handle
    in order for:
    • the see-through region to fit the in-game recast
      a.k.a. reshape/manufacture window,
    • the 3 tiny squares ( hinting click regions )
      to be located somewhere over the in-game buttons
      ( Retain the old attribute |Reproduce | Use the new attribute ),
    • the capture region to fit the text to be captured.
      • The fitting does not need to be pixel perfect in order for the Optical Character Recognition to work properly.
      • Also, try to avoid including any additional UI elements in the captured region.
        Reason: Depending on the fitting, parts of the in-game UI could be detected as a character
        ( f.e. the in-game scroll up icon may be detected as capital 'A' ).

1-2. Capture Region

Capture Region

  • ( A visible preview of )
  • The region setting the boundaries used for Optical Character Recognition.
  • Depending in which mode the process will be started, the capture region will either be located:
    • Preview Mode : full width of see-through region and a little above the in-game buttons.
    • Roll Mode : right half of see-through region and a little above the in-game buttons.

❗ IMPORTANT NOTE ❗

  • [ ! ] Without any actual game file alterations ( configs.pck ),
    it is not recommended to use EPW Recaster
    to look for stats on weapons that have unique (long descriptive) stats
    ,
    unless it's (one of those) unique stats being targeted in a roll.
  • In other words, avoid looking for stats on weapons having
    Purify Spell, God of Frenzy, Square Formation, Soul Shatter, Spirit Blackhole, ...
    as a possible stat in order not to miss a stat needing an in-game scroll
    (unless the previously mentioned stats are being specifically targeted).

1-3. Condition List Switcher

Condition List Switcher

  • Left Mouse Click:
    • Select any of 5 condition list slots to work with.
  • Right Mouse Click:
    • Copy / Export Condition List.
      • Can be used to:
        • share a condition list with anyone,
        • move a condition list to another slot by importing it.
        • back up a condition list ( f.e. in a text document ).
    • Paste / Import Condition List.
      • Can be used to:
        • import a condition list,
        • overwrite an existing condition list with another one.
    • Clear Condition List.
      • Clears all entries of a condition list.

1-4. Condition List

Condition List

  • A list containing preferred roll conditions.
  • Used in order to programmatically stop rolling when one of the listed required conditions is met.
  • The condition list can have both fixed amount stats and combo stats entries mixed.
  • The order of entries can be changed by dragging an entry over to another location in the condition list.

1-4-1. Fixed Amount Stat(s)

Fixed Amount Stat Fixed Amount Stats

  • Although REQUIRING A FIXED AMOUNT of a preferred single or grouped stat,
    rolled results CAN HAVE ANY OTHER STAT
    .

  • Will accept a roll if
    • an exact amount or more of a preferred single stat or of each of the grouped stats is detected.
  • Will reject a roll if
    • an exact amount or more of a preferred single stat or of each of the grouped stats isn't detected.
  • Recognizable by a blue stat color.
  • Always preceded by a fixed minimum amount of a preferred stat.
  • Can have up to 4 ( grouped ) stat requirements per entry.
  • Mainly used for rolls:
    • having equal stats:
      • 4 x Interval Between Hits
    • needing at least a certain amount of stats:
      • at least 2 x Channelling ( and/or any other stat rolled )
      • ...

1-4-2. Combo Stats

Combo Stats

  • Although NOT REQUIRING A FIXED AMOUNT of a preferred single or grouped stat,
    rolled results CAN NOT HAVE ANY OTHER STAT
    .

  • Will accept a roll if
    • a combination of at least one of each of the preferred grouped stats only is detected.
  • Will reject a roll if
    • a combination of at least one of each of the preferred grouped stats isn't detected or
    • a stat is detected that isn't listed in the preferred grouped stats.
  • Recognizable by a golden stat color.
  • Are not preceded by a fixed minimum amount of a preferred stat.
  • Can have up to 4 ( grouped ) stat requirements per entry.
  • Mainly used for rolls:
    • needing a uncertain amount of certain specific stats only:
      • at least 1 x Channelling & at least 1 x Reduce Physical Damage Taken ( and NOT any other stat rolled )
      • ...

1-4-3. Comparative Condition List Examples

Condition Would Accept Would Reject
Fixed Amount Stat
• Channelling -3%
• Channelling -2%
• Channelling -3%
• Channelling -2%


• Channelling -3%
• Magic +9
• Channelling -2%
• Reduce Physical Damage Taken +2%


• Channelling -3%
• Channelling -2%
• Channelling -3%
• Magic +9

• Channelling -3%
• Magic +9
• Magic +10
• Reduce Physical Damage Taken +2%


• Reduce Physical Damage Taken +2%
• Reduce Physical Damage Taken +1%
• Reduce Physical Damage Taken +2%
• Reduce Physical Damage Taken +2%


• Channelling -3%
• Reduce Physical Damage Taken +1%
• Reduce Physical Damage Taken +2%
• Reduce Physical Damage Taken +2%
Fixed Amount Stats
• Reduce Physical Damage Taken +2%
• Channelling -3%
• Reduce Physical Damage Taken +1%
• Channelling -2%

• Channelling -3%
• Channelling -2%
• Channelling -3%
• Channelling -1%


• Channelling -3%
• Channelling -1%
• Channelling -3%
• Reduce Physical Damage Taken +2%


• Channelling -3%
• Magic +9
• Magic +10
• Reduce Physical Damage Taken +2%
Combo Stats
• Channelling -3%
• Reduce Physical Damage Taken +1%
• Channelling -2%
• Reduce Physical Damage Taken +2%


• Channelling -3%
• Channelling -2%
• Channelling -2%
• Reduce Physical Damage Taken +2%


• Reduce Physical Damage Taken +2%
• Reduce Physical Damage Taken +1%
• Reduce Physical Damage Taken +2%
• Channelling -3%

• Channelling -3%
• Channelling -2%
• Channelling -3%
• Channelling -3%


• Channelling -3%
• Channelling -3%
• Magic +9
• Channelling -2%


• Channelling -3%
• Channelling -3%
• Magic +9
• Reduce Physical Damage Taken +2%

1-5. Condition Entry (Entries)

Condition Entry

❗ IMPORTANT NOTE ❗
Always put some thought in which rolled stats would be preferred and
add all-encompassing conditions accordingly
in order not to miss out on any good rolls.

  • In order to enlist a roll condition:
    • Select a preferred amount and preferred stat to be found.
      • (Optional) Select up to 3 additional preferred amounts and preferred stats to be found/combined.
        • Once a second preferred stat has been selected from the drop-down list,
          a checkbox to ignore amounts becomes available.
          If checked, the entry would become a combo entry ( allowing any amount of selected stats although limiting a roll to only contain the selected stats ).
    • Click the green + sign.
  • Any previously added condition can be removed
    by pressing the red x in the condition list.

Additional Notes

  • Ignore white stats, only blue stats are to be taken into account.
    ( f.e. 4 x Phys. Res. = max, ignoring the fifth white Phys. Res. stat on a gear )
  • When (accidentally) adding an amount larger than 1 of a unique stat ( f.e. Purify Spell ),
    it will instead be enlisted as 1 x.
  • When (accidentally) adding a summed amount exceeding the max stats possible,
    it will instead be enlisted as either 4 x or 5 x ( Atk. & Def. only ).
  • Using any kind of text editor, the list of selectable stat options can be altered in
    .\Config\Stats.cfg (includes additional comments).

2. Info Form


2-1. Form (Un)Chainer

Form (Un)Chainer

  • A toggle button attaching/detaching the info form to/from the main form.
    • Chained Mode ( attached forms mode | default at first launch ) :
      • Only the main form will be movable and resizable.
      • Only the main form location and size will be stored and restored upon relaunch ( due to the info form following its changes in location and/or size ).
    • Unchained Mode ( detached forms mode )
      • Both main and info form will be separately movable and resizable.
      • Both form locations and sizes will be stored and restored upon relaunch.

2-2. Log Folder

Form (Un)Chainer

  • Clicking this button opens the log folder.
    • For each roll, a resulting text and image file is logged.
    • [ ! ] Occasionally empty/delete this folder
      in order to free up storage space
      .

2-3. OCR Result Info

OCR Result Info

  • Displays text captured together with some additional info when previewing or rolling.

2-4. Preview | Roll Mode

Preview | Roll Mode

  • Preview Mode ( default at first launch ) :
    • Once started, will perform one single text capture.
    • No rolls will be performed in-game.
  • Roll Mode
    • Once started, will perform a set number of in-game rolls,
      • obeying any previously set conditions &
      • resulting in a programmatically moving mouse cursor and mouse clicks.
    • Can be stopped at any given time by clicking the Stop button.
    • Using any kind of text editor, timings can be altered in
      .\Config\Params.cfg (includes additional comments).

FAQ

[ (Show|Hide Answer) "The tool doesn't seem to work for me ... what do I do, doc ?" ]

Symptoms: "No valid roll information detected (yet)." | "... doesn't seem necessary to roll any further ... halted ..." | ...

Answer:

  • In general, each capture/roll produces a logged text and image file that may be worth checking
    in case it would be an OCR related issue.

    Check 2.2. Log Folder for more information.
  • It doesn't click/reproduce a roll.
    • It's most probably an admin privilege issue.
      Check [ Setup > Additional Setup Prerequisites ] for instructions on how to enable administrative privileges.
      • [ Developer Note ] This fixed it for most I've been chatting with that had this issue.
        If many encounter this, I may include code in an update
        to elevate administrative privileges programmatically ( hoping it would skip the manual fix ).
    • Additionally, make sure the capture region has been sized/positioned correctly.
  • It does click but the captured results are incorrect/incomplete.
  • It does click/reproduce a roll but still stops a batch roll after a short while.
    • May as well be a timing issue. Even though the most recent release already has all timings increased and I personally don't think this would still be needed, on older or trying-to-avoid-what-fries-and-chips-are-made-of-word computers a solution may be to increase timings even a little more ( add about 500~xxxx milliseconds to timings of choice ).
  • The captured stats don't match the rolled stats.
  • Inform me when the above does not provide a solution to the issue.

[ (Show|Hide Answer) "The captured stats don't match the rolled stats ... what do I do, doc ?" ]

Answer:

  • The ( most probable ) cause ( and solution ) for this is mentioned
    in the [ See-Through Region ] section of this ReadMe.:
    ( try to avoid including any additional UI elements in the captured region ).

[ (Show|Hide Answer) "Why did the tool skip a very exotic roll ?" ]

Answer:

  • Most probably, the cause would be any of these:
    • It did not meet any requirements set in the condition list.
      Always put some thought in which rolled stats would be preferred and add all-encompassing conditions for those.
    • The roll contained a unique stat with a long description.
    • The captured stats didn't match the rolled stats.
    • Inform me with detailed information ( and if possible steps to reproduce )
      if you think any of the above aren't the reason.
      I would consider such a priority fix.

[ (Show|Hide Answer) "What are my chances to roll certain stats ?" ]

Answer:

  • A good and up-to-date reference on roll chances per stat/gear can be found here:
    EPW Forum ~ R8 Recast Add-On Guide.
  • As for the tool, it doesn't increase chances in any way.
    Legend goes inf once wrote this tool only takes away the boring part of rolling gear ;).

[ (Show|Hide Answer) "I still use version 2 of the tool, should I update ?" ]

Answer:

  • In general: yes, I would advice to update.
  • In a nutshell:
    • For rolls like f.e. *2 x Channelling*, *4 x Interval*, any previous version will do just fine.
    • For more exotic rolls ( combined stats, ... ), version 3.1 is recommended.

[ (Show|Hide Answer) "Does this tool work on other servers as well (besides EPW) ?" ]

Answer:

  • In general: if server X follows the same mechanics of rolling gears, it should.
  • I only ever played EPW, although I got confirmation it works on f.e. Relentless as well.

[ (Show|Hide Answer) "Can the roll speed be adjusted/increased ?" ]

Answer:

  • Yes. As stated in section [ 2-4. Preview | Roll Mode ]:
    Using any kind of text editor, timings can be altered in
    .\Config\Params.cfg (includes additional comments).
  • Example of speed settings ( defaults since v3.1.2 ) :
# =================================================================
# Time it takes for the in-game reproduce button
# to become available again.
# Note: Should be above 1500 milliseconds (personal measured time).
# =================================================================

Await In-Game Reproduce Button Available    | 1750 milliseconds


# =================================================================
# Time it takes for the in-game stats to be rolled.
# =================================================================

Await In-Game Stats Rolled            | 1750 milliseconds


# =================================================================
# Time to wait before accepting/rejecting a roll.
# Notes:
#       - A lower value speeds up the roll process.
#         However, if lowered: more difficult to stop roll process
#         due to mouse cursor being moved.
#       - A higher value makes it easier for the user
#         to follow the roll process and thus leans
#         closer to human behavior.
# =================================================================

Await Accept/Reject Action            | 2250 milliseconds
  • Roll speed can even be sped up more if so desired.
    ( Mainly the 3rd timing option; check config comments for more info. )
  • If the tool is still open when changing the above mentioned file, restart the tool to apply any changes.

[ (Show|Hide Answer) "Can I to contact you in any way / provide any feedback ?" ]

Answer:

  • Sure. Check below for ways to get in touch with me.
    Feedback is always welcome and greatly appreciated.

Technical Notes & References

  • This tool has been programmed in Visual Studio 2019 Community Edition using C# language.
  • Third-party libraries used:

Contact | Feedback

( Any kind of ) Feedback is always welcome and greatly appreciated.