Skip to content

2014 Source (178 heroes)

Access: Public, Contributor, Core

Read Before You Start first. This page only covers what is specific to the 2014 source.

Heroes 178
Visual Studio 2010 (toolset v100), Win32
Database scripts Yes, May 2012 (src\sql\20120504\)
Server config files Included in server-config\: a full set from a community-run 2014 server, with gameplay tables
ls_query.ini Included in server-config\ls_dbagent\
Client Separate download: official Gemscool Indonesia client (2016), see Client

Everything sits one level deeper than in the later releases:

Folder What is in it
src\win\ All solutions (ls_*.sln, LSClient.sln, io3DEngine.sln, libraries)
src\src\ Source code
src\lib\ About 120 prebuilt libraries and DLLs
src\extra\ Extra tools plus extra\lib and extra\include (libcurl, OpenSSL, LS_NXSoap, LS_RestAPI) used by the billing server
src\sql\20120504\ Database scripts
build\ Not in the repository. Release builds create it: build\Server\<server>\ (servers) and build\Client\ (client DLLs)

The original release also shipped prebuilt executables in build\. The community repository leaves them out (they are build output); build them from source as described below.

The scripts in src\sql\20120504\ are saved as UTF-16. SQL Server Management Studio opens them fine.

  1. Create a database named LosaGame.

  2. Run lostsaga_tb.sql (62 tables).

  3. Run lostsaga_sp.sql (560 stored procedures).

  4. Run lostsaga_etc.sql (functions, views and the database users).

These scripts were tested on SQL Server 2022:

  • All 62 tables are created without errors.
  • 538 of 560 stored procedures are created. 22 fail with “Invalid column name”, because they were written for a newer table layout than the 2012 table script. Fixing them is a good contribution.
  • The functions are created. One view fails because it reads from LosaGame_log, which has no script in this release.
  • The two CREATE USER statements (lstggame, lstgweb) fail until you create those logins.

The scripts also reference LosaGame_log and LosaWeb. Procedures that use those databases will fail at run time until someone recreates them.

  • Extra build configurations. ls_gamesvr has LOCAL_DBG, LSWC and Ship_EU/ID/NA/SA/SEA/TH/TW. ls_mainsvr has LOCAL_DBG and Ship_NA. Stick to Debug and Release.
  • Debug builds add a D to the file name (for example ls_gamesvrD.exe).
  • Release output split. Release builds of FrameTimerDLL and iocpSocketDLL go to build\Server\lib, but the servers link from src\lib. Copy the new .lib files into src\lib after rebuilding them.
  • ioFreeType writes only to its own Bin\ folder. Copy its .lib into src\lib by hand.
  • ioPac and PatchManager were re-saved in Visual Studio 2022 at some point. Open them with a newer Visual Studio, or retarget them to v100.
  • LOCAL_DBG client builds accept IP*key on the command line instead of the packed format, with the port fixed at 14009.
  • Odd paths. Some projects still point at the original developers’ folders (C:\Users\Administrator\Desktop\trunk\..., D:\SVN_NO_DELETE\..., E:\DEV_ZONE\...). Remove those entries from Include and Library Directories if you get “path not found” warnings.

The matching client is the official Gemscool Indonesia client from 2016 (about 1.1 GB), shared as a separate download, not in Git. The source’s Release configuration also targets Indonesia (SRC_ID), so the two belong together. It has been tested with this source a few times, but it is not guaranteed to match it exactly.

  • Game data is packed in rs.iop and map.iop. The game data is the original.
  • The programs are rebuilt from this source: lostsaga.exe (Debug configuration, see below), io3dengine.dll, iofreetype.dll, iopac.dll, lslog.dll and townportal.dll. The other DLLs come from the source tree’s lib\ folder and from the DirectX June 2010 and VC++ 2010 redistributables. bdcap32.dll (in-game video recording) and flash9f.ocx (Flash windows) are kept from the original client.
  • Removed: GameGuard, hshield, the launcher and web broker, the uninstaller, crash dumper, shortcuts and DLLs the rebuilt programs do not use, plus personal files (saved login, logs, cached player skins).
  • map.iop was cleaned: 632 files that rs.iop also has (the client searches rs.iop first, so those copies were never loaded) and 2 copies in a stray texture\ folder were dropped. Every file the client could load before is still there with identical content.
  • There is no launcher. Start lostsaga.exe with the launch argument from your own login server, or with the debug login described in Before You Start. info\autoupgrade_info.ini and info\start.ini still name the old Gemscool hosts.

The community repository has a few small fixes on top of the original release. PATCHES-LosaDev.md at the repository root lists every one of them. Built on 2026-11-07 from that repository in Release|Win32 with the v100 toolset, the pre-build step disabled and static-runtime Boost:

Solution Result
ioINILoader, Log, LogDLL, FrameTimerDLL, iocpSocketDLL, LSLog, ioFreeType, SharedContainer, PerfMon, TownPortal Build
io3DEngine Builds
ls_dbagent, ls_mainsvr, ls_billingsvr, ls_gamesvr, ls_relaysvr, ls_loginsvr, ls_filewritesvr Build
LSClient Builds LostSaga.exe in src\src\LSClient\Release\ (about 4 minutes). Debug builds too.
ioPac The solution was re-saved in Visual Studio 2022 and only has x86 platforms. Build it with /p:Platform=x86, or retarget it.

Release servers land in build\Server\<server>\. Release also defines SRC_ID (the Indonesian build).

  • ls_loginsvr stopped with C1076/C3859 (precompiled header heap limit). The project now passes /Zm300.
  • Client Release failed with C2065: undeclared identifier: in src\src\LSClient\Main.cpp the command-line variables (szKeyOnCmd, szOptionsOnCmd, szIPOnCmd, iPortOncmd) were only declared when _DIRECT_RUN_, LOCAL_DBG or SHIPPING was defined, and Release defines none of them. They are now declared whenever LOCAL_DBG has not declared them.
  • LogDLL and FrameTimerDLL copy their DLL into build\zone_office\... after building. That step now skips folders that do not exist instead of failing the build.

If you work from the original release instead, add /Zm300 for the login server (set _CL_=/Zm300 before MSBuild) and build the client in Debug, which defines SHIPPING without any anti-cheat SDK.

Tested on 2026-11-07 on one Windows 11 PC: all nine servers start, and the client logs in to the lobby with a test account. Every file below is in the 2014 example set.

  • The servers, built in Release|Win32 as above. Each server folder needs its exe plus iocpSocketDLL.dll, frametimerdll.dll (from build\Server\lib), CrashFind.dll (from src\lib) and msvcr100.dll.
  • SQL Server (2022 Express works) with SQL authentication enabled.
  • The 2014 client download, which already has the fixed lostsaga.exe and iopac.dll (see Fixes in the client).
  1. Create LosaGame and LosaLogData and one SQL login that owns both.

  2. Run lostsaga_tb.sql, lostsaga_sp.sql and lostsaga_etc.sql as described in Database.

  3. Add stub procedures. The servers call about 175 procedures that the 2012 scripts do not have (pets, costumes, accessories, league, bingo and more), and every log query goes to LosaLogData, which has no script at all. db\make-stubs.js in the example set writes an empty procedure with the right parameters for each ls_query.ini entry that is missing, once for each database. Those features then load and save nothing, but the calls no longer fail.

  4. Run db\losadev-fixes-and-accounts.sql. It fixes four procedures whose parameters changed after 2012 (game_server_connection_on, game_item_extra_get_list, game_item_get_data_list, game_game_save), adds the second encryption key and creates the test accounts test1, test2 and gmtest1.

  5. Run db\losadev-features-from-2021.sql, db\losadev-first-tournament.sql and db\losadev-core-procs-from-2021.sql, in that order. They add the columns the 2012 tables lack, replace 118 stubs with the real tables and procedures of the 2021 release (pets, costumes, league, bingo, missions and more), and update seven core procedures that do not match the 2014 server. The server code for these features is the same in 2014 and 2021. The first tournament row makes Faction War and the LS Cup work: the server only continues a row that exists.

ls_query.ini in server-config\ comes from a community-run server. One line must change for login: 7=game_login_get_data STR (that server sent five values, this source sends one). db\query-check.js compares ls_query.ini with what the server code sends.

The server\ folder of the example set has a working config for every server, all on one PC, ports 14000 to 14103. Replace 192.168.1.10 with your PC’s IPv4 address and CHANGE_ME with your SQL login, and encode its password with ls_dbagent.exe -x yourpassword. Copy the gameplay tables (ls_gamesvr\config\, ls_mainsvr\config\, ls_billingsvr\config\) from server-config\.

Keep [Local] Version = 119483910 (Korea) in ls_gamesvr\ls_config_game.ini. In the original release the Indonesia mode stops with “This program has expired” (its license date was 2016-08-06); the community repository has that check off, but only the Korea mode was tested. It accepts the Indonesia client and checks the login key against the database, so no publisher or billing service is needed.

ls_dbagent (game, log, log server), ls_mainsvr, ls_billingsvr, ls_gamesvr, ls_relaysvr, ls_loginsvr, ls_filewritesvr, each started from its own folder with -c <ini>. server\README.txt lists the ports and inis. Wait until each port listens before starting the next one.

There is no password check on the server. The publisher’s web page wrote a fresh 15-character login key into userLoginDB.encodeKey, and the launcher started the client with:

lostsaga.exe EDEW3940FVDP4950,10,20,30,1,autoupgrade_info.ini,300,0,1,938400398?<launch key>?0?<IP and port>
  • Launch key: Encode15(loginKey, loginKey) followed by Encode15(userID, secondKey), both as hex. Encode15 is SEED in CFB mode (see ls_gamesvr\Util\ioEncrypted.cpp), and secondKey is the newest row of define_encode_key.
  • IP and port: one 64-bit number with the four IPv4 bytes in the low half and the game server’s CSPORT in the high half.
  • The key is used up at logout, so write a new one before every start. client\launch.txt in the example set has a worked example.
  • Windowed mode: put SpecAutoCheck=0, Spec=4, FullScreen=0 and Use16bitFrameBuffer=0 under [Setting] in Save\<nickname>\setting.ini. The client only reads FullScreen when Spec=4 (custom).
  • No window at all? If info\pp.log shows CreateDevice Failed(8876086c), check Spec. Spec=3 is the minimum preset: 16-bit full screen, which Windows 10 and 11 refuse. The client also saves Spec=3 by itself after such a failure, so set it back to 4.

Both are in the community repository and in the client download. If you start from the original release, make them yourself:

  • LostSaga.exe: it stops with “Your license has com up for renewal.” because the Indonesia license date has passed. IsRightLicense() in Local\ioLocalParent.cpp no longer checks the date.
  • iopac.dll: an old debug line in ioPac\BigPac.cpp showed the pack password in a message box.
  • Market (GUI\TradeMainWnd.cpp): empty slots drew two overlapping icons, and opening the Market with a listed item crashed the client, because SetIcon() was called twice with the same image and the second call freed it. Fixed the way the 2019 and 2021 sources do it.
  • 57 stub procedures have no definition in any release (coins, sbox, accessories, parts of the log database). Those features load and save nothing.
  • The DB agent still logs QUERY DISMATCH FIELDS for game_game_get_data.
  • There is no cash shop (no billing publisher).
  • A new account owns no hero, and the game then opens with a popup that points to the shop. The example account script gives the three test accounts six heroes each, with class 6 (Savage Berserker) first and userGameDB.userState = 600. The tutorial set is the class type × 100, and skills only count when the hero’s gear set matches it. Class levels stay at 0 until userClassDB has rows.
  • ls_mainsvr shows a message box if the PC’s IP addresses do not fit PrivateIPFirstByte. Run it visibly the first time.

Some projects list headers that are missing from the tree: ioLocalTaiwanLanguage.h (game server), BoostPooler.h (main server), resource.h (DB agent), Xtrap\XTrapSDK_Integrity.h and ioVoiceChat\ioHashString.h (client), ConsoleTextColorDefine.h (TownPortal). None of them stopped the build test above, so they are leftovers in the project files.

Version.h is already included for 18 of the 19 projects that need it. You still have to disable the TortoiseSVN pre-build step.

Real addresses, keys and accounts were taken out of the code before it was shared. PATCHES-LosaDev.md lists every file:

  • Public IP addresses the code connects to are 127.0.0.1; where the code compares the server’s own IP against a fixed list, the address is 192.0.2.1 (reserved, never matches).
  • Publisher, operator and game-service host names (Nexon, Gemscool, Z8Games, Garena, PlayPark, Valofe, OGPlanet, Daum, the old lostsaga.com web, patch and CDN hosts and others) are gone: URLs start with http://127.0.0.1/ and keep their path, bare host names are example.invalid, and staff e-mail domains are @example.invalid.
  • Passwords, API keys, app ids, hash keys, login tokens, test accounts and anti-cheat license strings are CHANGE_ME.
  • Vendor SDK binaries (XTrap libraries, bxIPGClient.dll) are not included. The billing server uses a small stand-in header for bxIPGClient, so it still builds; the Japan IPG billing calls just fail.

Point these at your own servers when you need them. The pack passwords and the client/server protocol keys were kept, because the game needs them.

  • Separate the community server’s own changes in server-config\ from the default values.
  • Retarget ioPac and PatchManager to the v100 toolset with a Win32 platform, like the other projects.