Skip to content

@wipe2238 wipe2238 released this Feb 7, 2019

  • Client cache contains more detailed informations about engine version used to compile scripts
    • new cache is requested if cached version info does not match Client
  • all players are disconnected when reloading client scripts
  • scripts changes
    • import errors slightly more developer-friendly
    • when possible, AngelScript error codes are converted to their names from angelscript.h (asINVALID_CONFIGURATION, asOUT_OF_MEMORY etc.)
    • [Server] with VerboseInit enabled, all imports are displayed in log
    • [Server] dependencies saved in .fosb files are relative to scripts directory
    • [Client, Server] precompiled scripts (cache/.fosb files) are saved with version of AngelScript used to compile them; in case of version mismatch:
      • [Client] new cache is requested
      • [Server] script is compiled from source
    • [Client, Server] importing functions from other modules is done only if no errors has been detected during scripts loading
  • temporary changes
    • warnings during scripts compilation are treated as errors (enabled during AngelScript updates, disabled in release)
  • additional notes
    • as this release contains more than one AngelScript update, it has been splitted into smaller parts (marked with git tags) which should be easier to handle for everyone
    • table below contains links to official AngelScript announcements (Version) as well as script engine repository (Revision); other than that, it's recommended to read more detailed changelog - especially sections script language and library interface (in case of extensions workin with angelscript.h)
    • for long-running servers, it's recommended to update engine tag-by-tag; links to compiled binaries are provided (note that AppVeyor keeps artifacts for about 6 months)
Version Revision Tag Binaries
2.26.1 r1582 v6-angelscript-2.26.1
2.26.2 r1602 v6-angelscript-2.26.2
2.26.3 r1633 v6-angelscript-2.26.3
2.27.0 r1682 v6-angelscript-2.27.0
2.27.1 r1699 v6
Assets 4

@wipe2238 wipe2238 released this Jan 23, 2019

  • fixed loading of .fosb files when script source cannot be found
    • dependencies are not checked if main .fos file does not exists
  • all applications will search for config file in following order:
    • executable name
    • original name, including suffix (ClientDX.cfg, MapperGL.cfg, etc.)
    • original name, excluding suffix (Client.cfg, Mapper.cfg, Server.cfg)
    • FOClassic.cfg
    • FOnline.cfg (temporary, file will be ignored in future)
  • added Server setting VerboseInit (boolean), false by default
    • if enabled, Server prints more details about some tasks (dialogs/maps/prototypes/scripts loading)
  • removed Server setting Language_N, use Languages instead; see v2 changelog for detailed info
  • Client log filename changed to Client.log
  • extensions changes
    • GameOptions* FOnline removed, use FOClassic instead
    • GameOptions::FoDataPath renamed to GameOptions::DataPath
    • ProtoItem::IsItem() consistent with engine-side check
  • scripts changes
    • [Client] global variables __Gmap* renamed to __Worldmap*
    • [Server] global function bool SwapCritters(Critter& cr1, Critter& cr2, bool withInventory, bool withVars) removed
    • [Client, Mapper] global variable __FoDataPath renamed to __DataPath
    • [Client, Server] global variable __GlobalMapMaxGroupCount renamed to __WorldmapMaxGroupCount
  • extensions/scripts changes (FOClassic.fos)
    • multiple defines has been renamed; see tables below for a complete list
    • added DIK defines
    • changed values of COMMAND defines
    • changed values of DRAW_PRIMITIVE defines
  • interface changes
    • Gmap* entries renamed to Worldmap*
    • LMenuGmap* entries renamed to LMenuWorldmap*
  • additional notes
    • as mentioned in announcement, this release end migration stage and starts regular development where bigger and/or more demanding changes can and will be introduced; to avoid "r413+ situation" some of bigger reworks might be introduced across multiple releases, making progress somewhat slower but (hopefully) easier to grasp
Old prefix New prefix
Old name New name
Assets 4

@wipe2238 wipe2238 released this Dec 30, 2018

  • fixed Client crash when loading .dat files in some scenarios
  • fixed ASCompiler crash when receiving warnings/errors from script engine
  • language packs are loaded by Server before initializing script system
  • Mapper scripts are compiled by Server during initialization
    • errors in Mapper scripts are not considered critical by Server; compilation will be stopped if errors are detected, and initialization will move on to next step
  • added FONT_TYPE_DIALOG, uses Dialog.fofnt
    • font file(s) are not required by default; if Dialog.fofnt cannot be found, Default.fofnt is loaded instead
    • used on dialog/barter screens only, replacing FONT_TYPE_DEFAULT usage
    • it's recommended to use FONT_TYPE_DIALOG whenever drawing strings over dialog/barter screens (even if game uses default font only) to fully support player-made interfaces
  • when reading WindowName setting, strings FOCLASSIC_STAGE and FOCLASSIC_VERSION are converted to real values; affects all core applications which uses this setting
  • Mapper window no longer adds engine version to WindowName setting
    • to restore previous behaviour use WindowName = My Game Mapper (vFOCLASSIC_VERSION)
  • reserved functions
    • [Client, Mapper] added void finish(), executed before closing application
  • extensions changes
    • added Client::UID[]
    • added GameOptionsExt::WallAlpha
    • Item::_Data::Rate added to FOCLASSIC_EXTENSION_STRIP_CONST list
  • scripts changes
    • preprocessor now understands #undef directive
    • added global define ANGELSCRIPT_VERSION
      exposes value with same name defined in angelscript.h
    • scripts for all targets can be placed in subdirectories
      • path to script (@ TARGET module in scripts.cfg) can be set using Unix and Windows format, but internally Unix format is used
    • Client:
      • added void CritterCl::GetNameTextInfo(bool& nameVisible, int& x, int& y, int& w, int& h, int& lines)
        returns size and position of name / dialog floater / chat message above critter head
      • added uint8 CritterCl::Alpha, const bool CritterCl::FadingEnable
    • Server:
      • added const bool Critter::IsDisconnected (thanks mojuk)
        returns true for offline player characters
      • added uint Critter::GetUID(uint8 index)
        returns player's UID0 - UID4
      • added uint Critter::GetIp()
        returns player's IP
      • added string@ Critter::GetIpString()
        returns player's IP in human-readable format
    • Client/Mapper:
      • added global variable uint8 __WallAlpha
        allows to change walls transparency, similiar to __RoofAlpha
      • added void SetZoom(float zoom)
        allows to change zoom level easily from scripts
Assets 4

@wipe2238 wipe2238 released this Dec 7, 2018

  • dialogs security fix (thanks Skycast)
  • ~ban command fix (thanks Skycast)
  • information about outdated Client version is always displayed to player
    • [windows] if FOGAME.MSG/1024 cannot be found (eg. cache hasn't been downloaded yet), Client displays native dialog box with hardcoded message
  • extension changes
    • if FOCLASSIC_EXTENSION_STRIP_CONST is defined, const is removed from selected entries; currently affects only geometry-related variables
  • extensions changes (requires Bleeding Edge mode)
    • introduced GameOptionsExt* FOClassicExt holding additions to GameOptions* FOClassic; this is a temporary change - once migration stage is finished (planned next month) both structures will be merged into one
    • introduced Ini* FOClassicExt::ConfigFile containing copy of configuration for currently running application
      • all sections starting with Client / Mapper / Server / Game Options are reserved for internal use
      • any additional sections are kept intact, and can be used by servers for game-specific configuration
    • introduced CmdLine* FOClassicExt::CommandLine containing copy of command line arguments
    • unlike AngelScript headers, CommandLine.h and Ini.h (required to use CommandLine/ConfigFile) needs to be included "manually" in extension code
  • breaking changes
    • previous Client versions won't be able to communicate with Server properly
Assets 4

@wipe2238 wipe2238 released this Nov 8, 2018

FOnline and FOClassic are now fully open-source projects.

  • restored loading of worldsaves and characters created by FOnline r412, and possibly older revisions (depends which file format version is used)
    • support for loading legacy files will be kept only until first change of their format (eg. changing format of worldsave will disable loading legacy worldsave and characters)
    • wordsave/characters files format changes are not planned during migration stage
    • loading has been briefly tested against real server state (thanks Kilgore)
  • when checking server status, number of currently connected players is returned instead of characters ingame; this should give more realistic numbers, especially on servers which uses NoLogout maps
  • configuration files / command line rework
    • application settings are loaded from disk only once, and cached in memory
    • all command line options has been renamed to use --CamelCase format; those which does not follow this scheme (eg. --some-weird-option) are intended for internal use and might be changed/removed without notice
    • all command line options uses same names as in configuration files
    • Client
      • removed setting UserPass; character password can still be provided by using --UserPass in command line
      • renamed setting FonlineDataPath to DataPath
      • if setting requires changes at runtime (eg. invalid Language in config file), it's done in memory only, without updating config file on disk
      • all boolean settings are false by default
    • Mapper
      • settings moved to Mapper section
      • Client/Server settings can be overwritten in Mapper.cfg, see below
    • Server:
      • settings moved to Server section
      • added setting Languages containing list of all languages supported
        • if Languages list is empty/not set, Language_N is used; it will continue to work until further notice
        • if Languages list is non-empty, Language_N entries are ignored
        • see bottom of changelog for config file fragment
    • settings reading logic
      • application starts, config file is parsed, all settings are stored in memory as strings
      • Client/Mapper: detail section is handled; example for GL application using App as its main section:
        • detail section (AppGL) settings are copied into main section (App) overwriting old entries or creating new ones
        • detail section (AppGL) is removed from memory
        • unused section (AppDX) is removed from memory
      • Mapper
        • Client configuration is loaded and parsed using same logic as in previous point
        • Server configuration is loaded
        • note: as Mapper has been using multiple config files, non-Mapper settings can be now be added inside Mapper.cfg - when loading non-Mapper configuration, setting will not be overwritten during loading step, but they might be overwritten during sections merge step; consider following scenario:
          • Mapper.cfg contains [Client] -> ScreenWidth = 5000
          • Client.cfg contains [Client] -> ScreenWidth = 1000
          • Client.cfg contains [ClientDX] -> ScreenWidth = 2000
          • Mapper loads Mapper.cfg: ScreenWidth = 5000 is used
          • Mapper loads Client.cfg: ScreenWidth = 5000 is used, as such setting already exists
          • Client's detail section is merged into main section: ScreenWidth = 2000 is used
          • making sure that mapper uses correct values can be enforced by either using detail section(s) in Mapper.cfg for non-Mapper settings, or not using detail section(s) at all in Client/Server config files
      • settings in cache are applied to GameOptions
        • default value is applied
        • value in config file is applied, if present
        • value in comand line is applied, if present
        • (integers) value is checked agains allowed minimum/maximum; if it's out of range, default value is applied
      • additional configuration based on setings not stored in GameOptions
      • summary: detail sections, together with sections merging, should allows fine-tuning applications to individual developers needs without need for creating or editing multiple files between playing and developing sessions - that change is affecting Mapper the most, as it have very little own settings
    • main section name is the same as original filename, without any suffix
      • exception: Client still uses Game options, instead of Client, for compatibility with FOConfig; it will be changed in future version together with introducing config tool changes
    • detail sections names are always the same as applications original filenames
  • extensions
    • uint8 Critter::Access - const removed
  • scripts
    • added global define __VERSION, for compatibility with FOnline
    • int Critter::GetAccess() changed to uint8 Critter::GetAccess()
    • added void Critter::SetAccess( uint8 access ) for changing players access level
      • works for player characters only
      • player_getaccess() is not called
      • custom access level (access > ACCESS_ADMIN) are not allowed to use RunServerScript()
  • additional info
    • project has been integrated with AppVeyor service, and configured to prepare (pre)release packages after succesful compilation; that allows anyone interested to use development version of each and all applications without waiting for official releases - which, from this version, will use binaries compiled by external services
      • binaries can be found under Image: Visual Studio 2013 -> Artifacts; despite of the image name, Visual Studio 2010 is used for compilation
      • Image: Visual Studio 2017 is used for checking if engine is ready for migration to VS2017; it most likely will take some time, so it can be safely ignored currently
      • binaries are available for six month since they have been created; see artifacts retention policy

Server.cfg fragment

# List of all supported languages separated by whitespace; if empty/unset, Language_0/1/... is used
# First language on list is used as default
# Length of each language name must be exactly four letters
Languages = engl russ
Assets 4