FOnline: Reloaded

Development => The Workshop => Topic started by: Wipe on October 14, 2014, 08:59:20 am

Title: FOHelp
Post by: Wipe on October 14, 2014, 08:59:20 am
As some players noticed, help screen has changed.

Old overlay text has been replaced with screen where you can change which part of informations you want to read. That gives an opportunity to include more informations inside of game itself - instead of relaying on wiki and forum - for both, developers and players.

Help screen is divided into sections, which contain one or more categories. Sections can be switched by using buttons on upper-left side of the screen; if given section includes more than one category, list of them will become visible as well.

Content is loaded from .fohelp files inside client's data/help/ directory, and all subdirectories. For maximum portability, everything is stored in JSON (http://en.wikipedia.org/wiki/JSON) format which, beside of game itself, can be easily used in other places as well.
As multiple sections/categories can be stored in single file, it allows players to create complex tutorials/help translations/notes/etc and distribute them with minimal installation instructions.

Creating .fohelp files is simpler than bursting level one noob with a minigun:

FOHelp generator (http://rotators.fodev.net/wipe/fohelp-reloaded-test.zip) is prepared to be usable as server module and a standalone tool. ASCompiler, one of SDK tools (included in package), is used to execute a scripts and generate .fohelp file.

Usage: ASCompiler fohelp.fos -run fohelp [options]
--dir <directory>input directory
default: text/
--fohelp <filename>output filename
default: user.fohelp
--subdirscheck subdirectories when building files list
default: off
--pretty.fohelp file format will be more friendly to human eyes
default: off
--testgenerated content will be printed on screen without saving to file
default: off

Package contains ready-to-use example, text/example.fohelp, as well as .txt files used to create it.

FOHelp support is already included in test client, so it can be tested right away. Be warned that "reloaded.fohelp" name is reserved for base help, and will be overwritten in future; use a different name for custom content.



At this moment feature is exclusive to FOnline: Reloaded.
After initial tests/fixes scripts source is going to be open, so (hopefully) it will be easy to implement in other FOnline games around.

Currently known issues:

FOHelp is using (slightly modified) JSON module (http://fodev.net/forum/index.php/topic,29624.msg259856.html#msg259856) by JovankaB.
Thanks to Henry for inspiration (http://forum.fonline-reloaded.net/index.php?topic=6158.0).



Locked, feature put on hold.
Title: Re: FOHelp
Post by: Henry on October 15, 2014, 12:07:02 am
I got this working (with help from friend - thanks Venta). It's a very good feature.

How should i format my text files? How wide and what is max characters? Also what is max for Section and Category?
Title: Re: FOHelp
Post by: Wipe on October 18, 2014, 07:32:03 am
For longer block of text, just write it as single line. Script will wrap long lines on it's own, so it will fit into text area no matter what size it gonna be, or which font is used.

Text area is set to 640x370 (to fit into 800x600 window); in future it's going to use maximum space available for current resolution.

There's no limits for number of sections/categories, nor maximum name width. While first thing probably won't change, names should get some restrictions - like max 100px width, disallowing multiline names, etc.
Title: Re: FOHelp
Post by: Paterlizzi on October 18, 2014, 11:09:36 pm
Looks great. I love the way it works.