Jump to content

[TOOL] Gilan's Encounter Counter (Beta Available) v1.0.3 update


Recommended Posts

8 minutes ago, KoltorTheGreat said:

The counter is great! The only gripe I have is more of a streamer specific one, and that is that the encounter box is pretty low res so if you capture it separately and enlarge it for stream it gets quite blurry. If you can I would try to eventually make it higher res once more important stuff is done, but it's not gonna stop me from using the counter or anything lol

This can actually be handled with themes. Just create 2x or whatever sized images for the tool and change the text size and drawing coordinates. The only thing that will be weird is small pokemon icon sizes.

 

I'll make a simple guide later.

Edited by Gilan
Link to comment
14 minutes ago, systematic said:

@Gilan even do I have set it in the corect folder.

 

image.png.f14eb407e22f0016626a2cd5b63fefc6.png

This happens when the app isn't installed in the ./pokemmo/data/mods/  folder, or if you extract it as ./GEC Package/Gilans Encounter Counter/

 

The correct path is: ./pokemmo/data/mods/Gilans Encounter Counter/

 

If it is that path, but it's still giving you this, then that means that there's a dependent file that my app is expecting to exist that is not in the PokeMMO folder.

It specifically looks for: the pokemmo.exe, the ./pokemmo/config/ folder and the ./pokemmo/data/ folder

 

However, that warning should cause another window to pop up that allows you to manually navigate to your pokemmo folder and select it. It should then operate as normal.

 

edit:

 

Oh, I'm guessing you ran my app once and then moved it afterwards. Go into the ./Gilans Encounter Counter/cache/ folder and delete all the files there.

Edited by Gilan
Link to comment
26 minutes ago, Gilan said:

This happens when the app isn't installed in the ./pokemmo/data/mods/  folder, or if you extract it as ./GEC Package/Gilans Encounter Counter/

 

The correct path is: ./pokemmo/data/mods/Gilans Encounter Counter/

 

If it is that path, but it's still giving you this, then that means that there's a dependent file that my app is expecting to exist that is not in the PokeMMO folder.

It specifically looks for: the pokemmo.exe, the ./pokemmo/config/ folder and the ./pokemmo/data/ folder

 

However, that warning should cause another window to pop up that allows you to manually navigate to your pokemmo folder and select it. It should then operate as normal.

 

edit:

 

Oh, I'm guessing you ran my app once and then moved it afterwards. Go into the ./Gilans Encounter Counter/cache/ folder and delete all the files there.

Well thanks for the fast reply ,  I got the encounter to start up but it doesnt show me the enounterd pokemons the tab stays empthy.

 

 

image.png

Edited by systematic
Link to comment
19 minutes ago, systematic said:

Well thanks for the fast reply ,  I got the encounter to start up but it doesnt show me the enounterd pokemons the tab stays empthy.

 

 

image.png

Please check the ./Gilans Encounter Counter/debug folder and let me know if either of the two files are populated with anything.

Link to comment
1 hour ago, systematic said:

image.png.8b87c671e23c53d81144cefa515a76fc.png

They are empthy both of them.

Ok, so I assume the black window is showing up for a few seconds on startup of my app.

 

If you are getting into a wild battle and the “A wild X appeared!” is covered up by a PokeMMO gui window (like the GTL or the pokedex) this will prevent it from counting.

 

If that’s not the case, then your issue will likely be fixed in the next update. Or, at the very least there are some new debugging features that will help me fix the issue for you.

Link to comment
2 hours ago, Gilan said:

Ok, so I assume the black window is showing up for a few seconds on startup of my app.

 

If you are getting into a wild battle and the “A wild X appeared!” is covered up by a PokeMMO gui window (like the GTL or the pokedex) this will prevent it from counting.

 

If that’s not the case, then your issue will likely be fixed in the next update. Or, at the very least there are some new debugging features that will help me fix the issue for you.

I dont have a black window it auto starts up without it.

 

Also cool cant wait.

Link to comment
6 hours ago, systematic said:

I dont have a black window it auto starts up without it.

 

Also cool cant wait.

Interesting. The debug logs should not be empty in this case. Just to make sure, you are running on a Windows 64bit computer?

 

Can you go to the ./Gilans Encounter Counter/utilities folder and open up the .json file there in a text editor (like notepad) and private message me the contents?

Link to comment

How to make a custom theme for the GEC:

 

Step 1: Go to the ./Gilans Encounter Counter/theme folder and create a duplicate of the default folder there (you can name the duplicated folder whatever you want your theme to be called)

 

Step 2: Replace the .png files in the theme with whatever you want, however, any image in the settingsUI should keep the same image dimensions as the original images (this is because the code for the settings panel has hard-coded formatting numbers in it, it is not designed for customized shapes). Feel free to use whatever image dimensions you want for the embedded/expanded/widgetMode images. Only use the PNG image file format. Avoid using the color: Red: 3  Green: 3  Blue: 24 (this is the transparency color used by my app)

NOTE: Be aware that my app does not allow semi-transparency through to the window behind the app. So, on the embeddedMode, expandedMode, and widgetMode images, do not use semi-transparent pixels in the image. An individual pixel either needs to be fully transparent or fully opaque. If you don't quite understand, just test out your images and if you notice a dark blue color showing up randomly, it's because you used semi transparency pixels.

Also, DO NOT change the names of the files. This will cause the app to crash when selecting your theme. Also, my app expects an instance of each of the .png files to exist (i.e. if you delete the English flag and don't replace it, the theme will be invalid).

 

Feel free to replace the font files with whatever font you want to use. You will tell my app to use these new font files in the next step.

 

Step 3: Edit the guiconfig.json.  This file defines text position and size, as well as icons, and some other stuff. Basically, you are instructing my app how to properly place everything and match stuff together.

    "text_font": The font file to use for alpha characters (i.e. the settings panel),
    "number_font": The font file to use for numeric characters,
    "setting_title_size": 36, <-don't mess with these, fully customizable settings panel is not yet implemented
    "setting_sub_size": 18, <-don't mess with these, fully customizable settings panel is not yet implemented
    "setting_cell_size_text": 14, <-don't mess with these, fully customizable settings panel is not yet implemented
    "setting_cell_size_numb": 14, <-don't mess with these, fully customizable settings panel is not yet implemented
    "widget_text_align_x": "left", "center", or "right" text alignment. left draws left to right. center draws middle outwards. right draws right to left
    "widget_text_draw_x": integer, the pixel x coordinate from where to start drawing the widget text
    "widget_text_align_y": "top", "center", or "bottom" text alignment. top draws from top to bottom. center draws from middle outwards. bottom draw from bottom to top.
    "widget_text_draw_y": integer, the pixel y coordinate from where to start drawing the widget text
    "widget_text_size": integer, the size of the widget text
    "widget_text_color": [0-255,0-255,0-255], RGB color of the widget text
    "expanded_text_size": integer, the expanded panel's text size (i.e. the numbers that show up on the expanded panel)
    "expanded_text_color": [0-255,0-255,0-255], RGB color of the widget text
    "expanded_text_align_x": "left", "center", or "right" text alignment. left draws left to right. center draws middle outwards. right draws right to left
    "expanded_text_draw_x": integer, the pixel x coordinate from where to start drawing the expanded panel's text (the top left of the expandedMode.png is the (0,0) coordinate for this input)
    "expanded_text_align_y": "top", "center", or "bottom" text alignment. top draws from top to bottom. center draws from middle outwards. bottom draw from bottom to top.
    "expanded_text_draw_top_y": integer, the top y coordinate to start drawing the individual pokemon counts & icons for the expanded mode (the top left of the expandedMode.png is the (0,0) coordinate for this input)
    "expanded_text_draw_bottom_y": integer, the bottom y coordinate to finish drawing the individual pokemon counts & icons for the expanded mode (the top left of the expandedMode.png is the (0,0) coordinate for this input)
    "expanded_icon_align_x": "left", "center", or "right" the x alignment of pokemon icons in the expanded panel
    "expanded_icon_draw_x": integer, the pixel x coordinate for which to draw the pokemon icons at (the top left of the expandedMode.png is the (0,0) coordinate for this input)
    "expanded_count": integer > 0, the maximum number of pokemon that can be shown in the expanded mode panel. If you set it too high, and the panel is not long enough, the pokemon will overlap and it won't look good.
    "expanded_panel_x_to_widget": integer, the x offset of the expanded panel to the widget (the top left of the widgetMode.png is the (0,0) coordinate for this input)
    "expanded_panel_y_to_widget": integer, the y offset of the expanded panel to the widget (the top left of the widgetMode.png is the (0,0) coordinate for this input)
    "embedded_text_align_x": "left", "center", or "right" the x alignment and draw direction of the text for the embedded mode
    "embedded_text_draw_x": integer, the pixel x coordinate for where to draw the text for embedded mode relative to the embeddedMode.png
    "embedded_text_align_y": "top", "center", or "bottom" the y alignment and draw direction of the text for the embedded mode
    "embedded_text_draw_y": integer, the pixel y coordinate for where to draw the text for embedded mode relative to the embeddedMode.png

 

Just play around with it. I'd suggest only changing one thing at a time and seeing how the app changes, until you have a firm grasp on what everything does.

 

And, that's it! Boot up the GEC app and your theme should be available in the theme list.

 

I'll see how successful this rundown is. If people have a lot of trouble still, I'll make a video guide.

Edited by Gilan
Link to comment

Hello, sorry for my bad english i use google translate

 

I have the problem of the black window not opening, I looked in the main.proprieties file in the config folder and all the mods listed are existing.

 

I have the debug file that I post here if it helps

 

ERROR:root:gecException:
Traceback (most recent call last):
  File "GilansEncounterCounter.py", line 1129, in run_app
  File "GilansEncounterCounter.py", line 231, in refresh_font_info
  File "GilansEncounterCounter.py", line 90, in refresh_gui_info
  File "GilansEncounterCounter.py", line 90, in <listcomp>
  File "encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2970: character maps to <undefined>

 

Thank you I hope I can have a solution to this problem. if you need a little more details i can give them to you

Link to comment
  • Gilan changed the title to [TOOL] Gilan's Encounter Counter (Beta Available) v1.0.2 update
1 hour ago, ecto94 said:

Hello, sorry for my bad english i use google translate

 

I have the problem of the black window not opening, I looked in the main.proprieties file in the config folder and all the mods listed are existing.

 

I have the debug file that I post here if it helps

 

ERROR:root:gecException:
Traceback (most recent call last):
  File "GilansEncounterCounter.py", line 1129, in run_app
  File "GilansEncounterCounter.py", line 231, in refresh_font_info
  File "GilansEncounterCounter.py", line 90, in refresh_gui_info
  File "GilansEncounterCounter.py", line 90, in <listcomp>
  File "encodings\cp1252.py", line 23, in decode
UnicodeDecodeError: 'charmap' codec can't decode byte 0x81 in position 2970: character maps to <undefined>

 

Thank you I hope I can have a solution to this problem. if you need a little more details i can give them to you

Just pushed an update. Please try the new version.

Link to comment

UPDATE:

 

Lots of bugs and compatibility error fixes. There are still some known compatibility bugs that I'm working through.

To update the tool, it's the exact same process as the original install, except this time it will ask you if you want to "replace files", for this select "replace all files".

 

CHANGELOG (v1.0.2):

 

  • Settings Panel should now be more manageable on smaller displays (crops size and is scrollable)
  • Included a "default 2x" theme, which should be better for 4k displays (the pokemon icons on expanded mode will still look small, I'll fix this in a later update; and the settings panel may still be small).
  • ***Custom strings are now compatible with the tool*** - some custom strings will throw an error, but my tool will tell you why that custom string is not compatible (has to do with custom "Shiny" and "A wild horde appeared!" text)
  • The error where PokeMMO was reporting a non-existing MOD file is now properly handled and should not cause an issue
  • The tool should be much, much better at counting all pokemon at 1.25x - 1.75x scaling
  • Added support for Spanish ROMs

 

 

Some things still not fixed that I know of:

Not counting at all due to a gecDebug.log reporting a cv2 assertion error. Working with Nakkura on this one.

Safari encounters not counting properly (this is due to "A wild x appeared!" text only appearing for a brief amount of time).

Nidoran m/f will break the csv data dump (due to the special symbol), I will fix this in the next update.

Edited by Gilan
Link to comment

I think this might be the most beneficial thing anything has ever done in terms of client customization serving an entire community of the game, and we all genuinely thank and praise you Gilan.

 

For anyone who read and noted my last comment, with the latest update, tricking the counter into believing that your custom strings are the default english version is no longer needed. Going back to custom strings + english default works perfectly for me now.

 

In terms of customization, I want to show everyone what can be done with this counter. 

My teammate @Barrelztitor has been playing with custom counter themes, and made these for me today:
 

Dk9PCBw.png


LjL1rSK.png

I asked for the long version specifically because I like the 6 lines of latest encounters. But I think if someone can do this, the possibilities are endless. I think he may be opening his own GEC theme shop on forums soon, but massive thanks to @Barrelztitor for making the custom theme and also @Gilan for even implementing the possibility to do this. You both sure know your playerbase. This update is amazing.

Link to comment
31 minutes ago, kaaru13 said:

when i run the software my computer shows like this, how should i solve it?image.png.b5c770b794adc2cae9e4812a5a0a3b71.png

1. What is your computer’s operating system (windows? 64bit? 7/8/10?)

2. Did you move the GEC.exe outside of the folder it was in?

 

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.