Skip to content
Snippets Groups Projects
Commit 21e77372 authored by Blank_Alt's avatar Blank_Alt Committed by Pregmodder
Browse files

Improve FCHost-documtation

parent 143e4ae2
No related branches found
No related tags found
No related merge requests found
......@@ -11,20 +11,27 @@ The below requirements must be met to build this project.
I haven't tested these platforms, and there is platform-specific code missing.
Shouldn't be too hard to add, check the CEF distribution and treat FCHost
as a derivative of tests/cefsimple.
- Have the environment variable CEF_ROOT set to the root of your CEF distribution.
- Have the CMake binary folder added to your path e.g. for Windows C:\Program Files\CMake\bin.
- Windows requirements:
Visual Studio 2015 or newer.
Visual Studio 2019 (the community edition will work fine) or newer with the "Desktop development with C++" workload installed.
BUILD STEPS
You must have the environment variable CEF_ROOT set to the root of your
CEF distribution.
If you are running Windows and meet the above requirements then within the root of FCHost/,
execute cmake_vs2019.bat which will generate FCHost.sln in the same location.
Now open FCHost.sln in Visual Studio 2019
and build from there via tool bar -> Build -> Build Solution or Ctrl + Shift + B.
If you are running Windows, execute cmake_vs2015.bat, open FCHost.sln, and
build from there. Resulting binary and support files will be in
The resulting binary and supporting files will be in
FCHost/fchost/Debug, or FCHost/fchost/Release depending on the configuration
selected in Visual Studio. You should be able to zip up the contents of the
selected in Visual Studio via the drop down found under the Build and Debug tool bar headers.
You should be able to zip up the contents of the
Release folder and distribute them to another machine or user if desired.
Due to space and privacy concerns it is suggested that you remove *.html and fchost.ilk prior to distribution.
If you are not running Windows or you need something else special, please
familiarize yourself with CMake and see the detailed information in CMakeLists.txt.
familiarize yourself with CMake and see the detailed information in CMakeLists.txt.
\ No newline at end of file
## How to update the Pregmod HTML file and art resources
To update Pregmod HTML file first have on hand a copy of the file you
which to you use and then place it next to the fchost executable.
To update or use some art resource(s) the desired image pack(s)
will need to be downloaded (links can be found in game under the respective option).
The one's which contain the word embedded will not require downloading
additional resources as they are built into the html.
Once downloaded extract, then create a resources sub directory
next to the fchost executable and place the resource(s) there.
Finally refersh or re-launch FCHost then
in game go to options (o key) -> Display -> Images and select your desired option.
e.g. for Elohiem's interactive WebGL
fchost.exe
- resources
- webgl
For Shokusku's rendered image pack it would be
fchost.exe
- resources
- dynamic
- renders
## Keybinds
Ctrl+Plus and Ctrl+Minus keybinds to zoom in and out.
CTRL+SHIFT+J to ShowDevTools
## Save file locations
On Windows this would be Documents\FreeCities_Pregmod\FCHostPersistentStorage.
## Building FCHost
If you want to build it yourself please refer to [FCHost/Building_FCHost.txt](FCHost/Building_FCHost.txt).
\ No newline at end of file
......@@ -36,9 +36,46 @@ To play open FCpregmod.html in bin/ (Recommendation: Drag it into incognito mode
JSON at position 0. Stack Trace: SyntaxError: Unexpected token @ in JSON at position 0 at JSON.parse (<anonymous>)
at JSON.value` or some variant
- clear cookies
- Use FCHost (Recommended)
In addition to not having to deal with browser cache limits or browser cookies being killed and losing save data,
Sugarcube storage is stored onto your disk as more easily editable files,
can also be noticably faster.
A pre-compiled Windows x64 version along
with pre-compiled versions of Pregmod FC designed to support browsers that
do not recognize globalThis can be found [here](https://mega.nz/folder/vzxgwKwL#L4V4JEk1YfWcvC7EG76TMg).
For more details please refer to [FCHost/Documentation_FCHost.md](FCHost/Documentation_FCHost.md)
- If you are using Firefox the cache quota can be increased by typing about:config in the address bar and then modifing dom.storage.default_quota's value. Default value is 5120 kilobytes/ 5 MB.
- If you don't have or want to use Firefox or FCHost:
1. download and unzip NW.js SDK (https://nwjs.io/ ) for your operative system
2. copy the game file (FC_pregmod.html) into the "nwjs-sdk-v0.XX.Y-YOUR_OS" folder
3. in the same folder, create a text file with the following content:
{
"name": "Free Cities pregmod edition",
"main": "FC_pregmod.html",
"dom_storage_quota":30
}
and save it as package.json (it must be a UTF-8 file). See the attached file
4. double click nw.exe to launch the game
In this example, 30 is the limit (in MB) that is set for the storage quota, but you can replace it with any number. Google Chrome has the same default value as Firefox.
According to the official docs, the path where the cache files are stored depends on the "name" field in the manifest (in this example: "Free Cities pregmod edition"):
- on Windows: %LOCALAPPDATA%/<name-in-manifest>/
- on Mac: ~/Library/Application Support/<name-in-manifest>/
- on Linux: ~/.config/<name-in-manifest>/
You can customize the path by adding another parameter to package.json:
```
{
"dom_storage_quota":30,
"chromium-args": "--user-data-dir='PUT_YOUR_PATH_HERE'"
}
```
* Everything is broken!
- Do not copy over your existing download as it may leave old files behind, replace it entirely
- **Do not copy over your existing download** as it may leave old files behind, replace it entirely
* I can't save more than once or twice.
- Known issue caused by SugarCube level changes. Save to file doesn't have this problem and will likely avoid the first problem as well.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment