Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
I wonder if the android "Port" has been fixed yet.
I considered it unplayable because you can't read what the descriptions of buttons.
EDIT: No they havent. Have they even tested this out? Did they really just throw out the APK, saw it install and decided to call it a day?
The COC2 one works fine but I literally cant see what the button will do!
This is pissing me off. It had been reported on the forums even when the android version released. It's such a half assed port fuck.
Honestly go onto the bug report forums and report it. I've seen a couple of reports, including my own, so the more people report it the less they can ignore it. In theory. In practice they probably will ignore it anyway, but I'm allowed to hope.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
I wonder if the android "Port" has been fixed yet.
I considered it unplayable because you can't read what the descriptions of buttons.
EDIT: No they havent. Have they even tested this out? Did they really just throw out the APK, saw it install and decided to call it a day?
The COC2 one works fine but I literally cant see what the button will do!
This is pissing me off. It had been reported on the forums even when the android version released. It's such a half assed port fuck.
If I recall, you should be able to go into the options and change text size. Use Accessibility from within Android to magnify the screen after installing, set your size?

Do your browsers allow you to open HTML files? Maybe landscape mode with Firefox would work. Might be responsive CSS design.
 

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
If I recall, you should be able to go into the options and change text size. Use Accessibility from within Android to magnify the screen after installing, set your size?

Do your browsers allow you to open HTML files? Maybe landscape mode with Firefox would work. Might be responsive CSS design.
To clarify, I believe the issue they're talking about is with tooltip pop-ups that provide some context as to what different choices can lead to. They've never worked right for the js Android builds, either popping up for a literal instant or not popping up at all. The game probably expects a mouseover event that a touchscreen can't really provide. The issue is also present when opening the HTML file directly in an android browser, as I've tested it on Chromium
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
To clarify, I believe the issue they're talking about is with tooltip pop-ups that provide some context as to what different choices can lead to. They've never worked right for the js Android builds, either popping up for a literal instant or not popping up at all. The game probably expects a mouseover event that a touchscreen can't really provide. The issue is also present when opening the HTML file directly in an android browser, as I've tested it on Chromium
The CSS/JavaScript can be extended too by simply binding to touch events...should easily be fixable. Provide an example (exact scenario and instructions, and aim around the beginning of the game or a save file), maybe I can make a universal patch tonight.
 
  • Like
Reactions: jfmherokiller

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
The CSS/JavaScript can be extended too by simply binding to touch events...should easily be fixable. Provide an example (exact scenario and instructions, and aim around the beginning of the game or a save file), maybe I can make a universal patch tonight.
I'm not 100% sure what you're looking for but hopefully this works. I've included two separate scenarios just to be sure. Apologies for the probably dumb question but are you looking to patch the actual .apk build? Or is this a "you have to use the HTML file from the windows build in your mobile browser for it to work" kind of thing?

You don't have permission to view the spoiler content. Log in or register now.
The tooltips are more important during dialogue, as they often contain warnings concerning what type of content the option leads to (for example warning people about gay content or other stuff people may not be into, or warnings for potentially game-altering stuff like getting yourself bimbofied or permanently transforming a character.) I didn't include any dialogue scenarios here as it's quicker to do the two options I showed, and unless it uses a completely different system for some reason it should all be the same on the backend.

I also can't really provide screenshots to show how the tooltips act on android because they just sorta pop up and then immediately disappear without any time to read.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
APKs are just zip files. Could easily patch any of the resources and then add to zip, overwrite, redeploy. As for this, what you might need to do is act like you're going to click a button but drag away from it while keeping your finger down. It shouldn't register as a tap, and it may think it is still :hov. I needed an example of where it doesn't work for Android but does for PC, does it do this at the main menu in Android?

Edit: I've installed the APK, I can see what you mean. The CSS does indeed need to be modified, I'll look into where and what and do a patch myself. If it works, I'll provide a shell script for any Linux user to auto-patch if possible.
 
Last edited:

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
APKs are just zip files. Could easily patch any of the resources and then add to zip, overwrite, redeploy.
I figured, but didn't want to assume.

Edit: I've installed the APK, I can see what you mean. The CSS does indeed need to be modified, I'll look into where and what and do a patch myself. If it works, I'll provide a shell script for any Linux user to auto-patch if possible.
Excellent. If you want, I can help you test that when it's ready (the android fix, not the linux script.) Thank you so much for looking into this, it's been the bane of android users for so long.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
I figured, but didn't want to assume.


Excellent. If you want, I can help you test that when it's ready (the android fix, not the linux script.) Thank you so much for looking into this, it's been the bane of android users for so long.
I found the issue, they're using onMouseOver, specifically:

JavaScript:
return u.createElement("div",
{id:n,
className:e,
title:t,
style:{fill:o},
"data-header":this.props.statusEffect.storageName,
"data-body":this.props.statusEffect.tooltip,
"data-iconclass":this.props.statusEffect.iconName,
"data-remaining":this.props.statusEffect.minutesLeft,
onMouseOver:function(){return window.setTooltipElement(n,
Wu.SU.STATUS_EFFECT)},
onMouseOut:function(){return window.setTooltipElement(null,
Wu.SU.NONE)}},
a,
u.createElement("span",
{className:"focusBorder",
tabIndex:"-1"}))}}]),
o}(u.Component);
They need to use onTouchStart and onTouchEnd. I'll try patching it and testing.

Edit: Progress, initially. At the moment, I can get them to stay up permanently from a tap, but that also triggers the button. I am wondering how I wish do go about this, such as requiring two taps for a button to work, one to show the message, another to actually click. Or just hold+drag off.
 
Last edited:

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
Edit: Progress, initially. At the moment, I can get them to stay up permanently from a tap, but that also triggers the button. I am wondering how I wish do go about this, such as requiring two taps for a button to work, one to show the message, another to actually click. Or just hold+drag off.
I think hold+drag off is how it used to work in the old flash apk builds. That'd be my personal preference rather than having to tap twice, but beggars can't be choosers.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
I think hold+drag off is how it used to work in the old flash apk builds. That'd be my personal preference rather than having to tap twice, but beggars can't be choosers.
Almost exclusively depends on WebView, browser-backend stuff. Google just does whatever the fuck it wants and expects the world to twist. Working out different methods to test. Currently, I've got it to work, except now it doesn't go away unless you click a button. So you can check each button, and they'll just keep showing up multiple. xD It's a slow bitch patching, signing, deploying, installing, launching, testing.

The problem with click-hold is that is for CONTEXT MENU, aka it simulates right-clicking. I don't know if the game uses right-clicks, so I can just intercept long-click and tell it to ignore actually right-clicking and use that to trigger start if Android doesn't fuck that over, too.
 
Last edited:

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
Almost exclusively depends on WebView, browser-backend stuff. Google just does whatever the fuck it wants and expects the world to twist. Working out different methods to test. Currently, I've got it to work, except now it doesn't go away unless you click a button. So you can check each button, and they'll just keep showing up multiple. xD It's a slow bitch patching, signing, deploying, installing, launching, testing.

The problem with click-hold is that is for CONTEXT MENU, aka it simulates right-clicking. I don't know if the game uses right-clicks, so I can just intercept long-click and tell it to ignore actually right-clicking and use that to trigger start if Android doesn't fuck that over, too.
I can confirm that the game does not make use of right clicks whatsoever.

Edit: I should ask, will this fuck with existing saves in the android app? will it count as a separate app or will it count as an update and let me keep my saves? Because "save to file" is also something they broke so I can't back up my files or import them into another app.
 

jfmherokiller

Well-Known Member
May 25, 2020
1,181
1,663
I found the issue, they're using onMouseOver, specifically:

JavaScript:
return u.createElement("div",
{id:n,
className:e,
title:t,
style:{fill:o},
"data-header":this.props.statusEffect.storageName,
"data-body":this.props.statusEffect.tooltip,
"data-iconclass":this.props.statusEffect.iconName,
"data-remaining":this.props.statusEffect.minutesLeft,
onMouseOver:function(){return window.setTooltipElement(n,
Wu.SU.STATUS_EFFECT)},
onMouseOut:function(){return window.setTooltipElement(null,
Wu.SU.NONE)}},
a,
u.createElement("span",
{className:"focusBorder",
tabIndex:"-1"}))}}]),
o}(u.Component);
They need to use onTouchStart and onTouchEnd. I'll try patching it and testing.

Edit: Progress, initially. At the moment, I can get them to stay up permanently from a tap, but that also triggers the button. I am wondering how I wish do go about this, such as requiring two taps for a button to work, one to show the message, another to actually click. Or just hold+drag off.
in any kind of modern development thing wouldnt there be some kind of css polyfill or the like that will check and take care of choosing on mouseover vs Ontouchstart?
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
I can confirm that the game does not make use of right clicks whatsoever.

Edit: I should ask, will this fuck with existing saves in the android app? will it count as a separate app or will it count as an update and let me keep my saves? Because "save to file" is also something they broke so I can't back up my files or import them into another app.
It'd be a different signing key, so it'd think of it as a different 'app'. TitaniumBackup 'data-only' would probably work.
in any kind of modern development thing wouldnt there be some kind of css polyfill or the like that will check and take care of choosing on mouseover vs Ontouchstart?
There are various JS libraries that can handle it, but it'd be a pain in the ass to try to integrate. Trying to do this as clean and small as possible. There is only one section that needs modding to affect this behavior, but I'm trying to intercept long-press, and it isn't playing nicely.
 

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
It'd be a different signing key, so it'd think of it as a different 'app'. TitaniumBackup 'data-only' would probably work.
Unfortunately Titaniumbackup needs root, which, while I probably could root my 2017 Amazon Fire tablet, it's too easy to brick for me to try. So I guess I'm shit outta luck on that front. Still, not the end of the world.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
Unfortunately Titaniumbackup needs root, which, while I probably could root my 2017 Amazon Fire tablet, it's too easy to brick for me to try. So I guess I'm shit outta luck on that front. Still, not the end of the world.
Who uses Android without rooting? Er, anyway, I got it to work perfectly, complete success. Why are exporting/importing saves broken for you?
 
Last edited:

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
Who uses Android without rooting? Er, anyway, I got it to work perfectly, long-hold to reveal descriptions. Going test trying to prevent longpress as well. Why are exporting/importing saves broken for you?
Someone who can't afford to replace their device if it bricks during the process, a lesson I learned with an old Galaxy S3 years ago.
Anyway, I dunno why I can't save to file in the app. I recall seeing other people mention the same issue, which leads me to believe that the devs simply broke saving to file. I can load from a file just fine. Just can't save. It's not a permissions issue afaik. Clicking the button just leaves it highlighted, no external dialogue pops up to save the file like it does with loading.
 

BupoTiling03-Retired

Well-Known Member
Modder
Jul 21, 2018
1,359
1,913
Someone who can't afford to replace their device if it bricks during the process, a lesson I learned with an old Galaxy S3 years ago.
Anyway, I dunno why I can't save to file. I recall seeing other people mention the same issue, which leads me to believe that the devs simply broke saving to file. I can load from a file just fine. Just can't save. It's not a permissions issue afaik. Clicking the button just leaves it highlighted, no external dialogue pops up to save the file like it does with loading.
They must not have implemented file-choosing using native HTML...weird, or it is broken for Android's kittysandbox.

Anyway, a simple sed from onMouseOver to onTouchStart and onMouseOut to onTouchEnd works best (complete success), as long as you don't tap the button, of course. Keep your finger on the screen for the button to keep the description up. 2 locations inside main.[0-9a-f]+.js.

Not sure how we all want to add this. If I supply an APK, you'll need to manually migrate your save. If you can use LuckyPatcher you can easily patch the app.
 
Last edited:

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
They must not have implemented file-choosing using native HTML...weird, or it is broken for Android's kittysandbox.

Anyway, a simple sed from 'onMouseOver' to 'onTouchStart' and 'onMouseOut' to 'onTouchEnd' works best, as long as you don't tap the button, of course. Keep your finger on the screen for the button to keep the description up.

Not sure how we all want to add this. If I supply an APK, you'll need to manually migrate your save. If you can use LuckyPatcher you can easily patch the app.
Lucky patcher would be most convenient for people who don't want to lose their saves, but it's up to you.
 

Hargan2

Well-Known Member
Nov 27, 2017
1,202
1,399
Alright, as long as LP can grow a file. I've always worked with the bytes I could. xD
I'm going to pretend like I know what that means and I'm not just blindly stumbling around and hoping that it'll work :KEK:

Also, I noticed you mentioned this

2 locations inside main.[0-9a-f]+.js.
Which means that unless they fix it on their end, this will have to be recreated every time they update, as for some reason they change the name of those files with every release. I have a bunch of them from before I figured out they didn't overwrite lol

1666057708247.png
 
4.10 star(s) 70 Votes