June 27, 2017, 08:57:11 am
Username:

Password:

Topic: FOHelp  (Read 779 times)

Wipe

  • Posts: 48
  • Random is god
    • View Profile
    • FOdev
FOHelp
« 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 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:
  • create one or more .txt files which contain some interesting informations about a game
  • add as first line: FOHELP:Section name:Category name
  • run included .fohelp generator (see below)
  • copy .fohelp file to [client directory]/data/help/
  • (re)start a game

FOHelp generator 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:
  • Initial text isn't scrolled properly; it fixes itself after first section/category change.

FOHelp is using (slightly modified) JSON module by JovankaB.
Thanks to Henry for inspiration.



Locked, feature put on hold.
« Last Edit: June 13, 2015, 08:36:59 pm by Wipe »
Games are meant to be created, not played...


Henry

  • Wiki Administrator
  • Global Moderator
  • Posts: 751
  • Gravity is just a theory. Try Density.
    • View Profile
Re: FOHelp
« Reply #1 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?
« Last Edit: October 18, 2014, 01:56:26 am by Henry »

Wipe

  • Posts: 48
  • Random is god
    • View Profile
    • FOdev
Re: FOHelp
« Reply #2 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.
Games are meant to be created, not played...


Paterlizzi

  • Guest
Re: FOHelp
« Reply #3 on: October 18, 2014, 11:09:36 pm »
Looks great. I love the way it works.