- Jun 20, 2019
- 655
- 240
Yes I have them all. Someone gave me the updateYou have the side-quest? Were did you made the download?
Yes I have them all. Someone gave me the updateYou have the side-quest? Were did you made the download?
The new instructions and proxy are only needed for 0.0.14. You can download the update here:can you pass the likn?
Hey, I am glad you are writing your own version for the android community!Hi, l8rdude
I'm trying to write an api server for this game, on my Android phone. But I can't forge a success response of /gamedata/map since all I get from communications between the game and the real server is either "no token provided" or "invalid token".
Can you give a example of valid response of /gamedata/map? Thanks!
By the way, if the game is using libcurl, the proxy can be set with environment variables like http_proxy or ALL_PROXY. And if that works, it woudn't be necessary to patch the game files anymore, right?
Thanks for the information!Hey, I am glad you are writing your own version for the android community!
First of all, thanks very much for hinting at the environment variable, I had no idea these exist... I should have checked the docs haha. Great info!
As for the /gamedata/map response. The game expects the file contents of the requested map (.tmx file) as a response. No JSON or other markup, sending just the file contents will be enough (the game explicitly checks for header code 200 also, but that's pretty much a given).
Cheers,
Oh wow, I never bothered to check the storage. That's huuuuge, nice. Hope I will have the time to download and update my post later.Thanks for the information!
I have found that map files onYou must be registered to see the linkscan be accessed without authentication. Including maps for 0.0.14
I've updated my previous post to include the 0.0.14 maps now and also put a link to your solution as the automatic map download and caching is definitely a nice touch.Two Horns API Server
General Instructions:
1. Append "127.0.0.1 api.pinkcafeart.com" to hosts file of your system.
2. Import certificate.
3. Install Node.js
4. Run "node server.js" with root or administrator privilege. Since listening on port 443 may require root / Administrator privilege.
5. Run the game and you should be able to login now. Note that you should keep the server running while playing the game.
Instructions for Android:
// You can only do this on a rooted Android device!
1. Append "127.0.0.1 api.pinkcafeart.com" to /system/etc/hosts
2. Copy 85c9734f.0 to /system/etc/security/cacerts/ and change it's owner to root:root, permissions to 644
3. Install Termux(You must be registered to see the links).
4. Open Termux and install Node.js and tsu package with "pkg install nodejs tsu".
// You may need to run "termux-setup-storage" to gain access to internal SD card.
5. cd into the directory where server.js is located, run "sudo node server.js"
I have only tested it on Android, but it should work on any other platforms as well in theory.
Where did you get the first picture?
Maybe because I've not slept yet, but took a bit to figure this out, but finally did, and got it to work. Thank you so much for this.Alright, a few things changed behind the scenes in Two Horns 0.0.14 to combat piracy. The most important one is that version 0.0.14 is no longer providing the actual map files in the release. You're getting the image tilesets but not the actual maps. When a patreon user logs in and plays the game it downloads the map files during runtime when map changes occur or when a new savegame is started. So in order to play the 0.0.14 content you must be a patron to Pink Cafe Art.
What we can do is run our own API server and instead of providing 0.0.14 map files, we'll provide the ones from 0.0.13 (since the author released those for the old client). The benefits of doing that is we can play using the new 0.0.14 client that introduced the new cheat menu and also enjoy several bugfixes.
This also means a patreon user can share their 0.0.14 map files with us if they desire to do so.
Thanks to felixthetrap 's discovery the 0.0.14 map files are publicly accessible so parts of my previous paragraph are no longer true. If you want an easy and automated way to just play, use their solution instead.
Here's what you need to do to get started:
- Download and install 0.0.14 map files:
Mega
Extract the contents of the zip to C:\Users\<username>\AppData\Local\TwoHorns\PinkCafeArt\OgreData\ScenarioData\ogre_alpha_scenario\map\
A fast way to get there would be WIN+R and enter %LocalAppData%\TwoHorns\PinkCafeArt\OgreData\ScenarioData\ogre_alpha_scenario\map\- Download the Two Horns proxy from the attachment and extract it to the game folder. When asked, overwrite all files with the ones from the zip.
- Launch TwoHornsProxy.exe. The first time you run it you will be asked to install and trust a root certificate to your system. This is required to decrypt the https traffic. After accepting the message it will no longer popup in the future. Important: You must leave this proxy window open while you are playing.
- Launch the game normally using the TwoHorns.exe file and click through the title screen. When asked for a login enter any data you like and hit okay. It will be accepted and you're ready to play.
If everything went well, you will see something similiar to this:
View attachment 929410
FAQ
- Q: Is it required to always run the proxy if I want to play?
- A: Yes, without the proxy no data can be spoofed and modified for the client to accept it.
- Q: The proxy can't start or shows errors.
- A: The proxy requires at least .NET Framework 4.7.2. Most computers have it already installed if they're running Win7/8.1/10 and do system updates frequently. Also make sure port 8888 is available and not already bound by any other application.
- Q: Why do you supply a different libcocos2d.dll file?
- A: The game engine uses cocos2d-x to handle many parts of the game, e.g. sound, rendering and networking. By default all connections to the server are direct and no proxy can be configured to intercept the data. In order to tell the game to connect to a proxy anyway, I patched the cocos2d library to tell libcurl to connect using a proxy:
View attachment 929403
Whenever this patched libcocos2d.dll file is used all connections will go through a proxy at 127.0.0.1:8888.
- Q: My game appdata is in a non-default folder, how can I change the path for the proxy?
A: Open TwoHornsProxy.exe.config and edit the value for "MapPath" at the end of the file. You will also find all the spoofed messages there.
Let me know if there's any problems, any feedback is appreciated. I didn't have an old "endgame" save so testing everything beforehand was not possible.
Cheers,