2014 Source (178 heroes)
Access: Public, Contributor, Core
Read Before You Start first. This page only covers what is specific to the 2014 source.
Quick facts
Section titled “Quick facts”| 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 |
Repository layout
Section titled “Repository layout”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.
Database
Section titled “Database”The scripts in src\sql\20120504\ are saved as UTF-16. SQL Server Management Studio opens them fine.
-
Create a database named
LosaGame. -
Run
lostsaga_tb.sql(62 tables). -
Run
lostsaga_sp.sql(560 stored procedures). -
Run
lostsaga_etc.sql(functions, views and the database users).
What to expect
Section titled “What to expect”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 USERstatements (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.
Things specific to 2014
Section titled “Things specific to 2014”- Extra build configurations.
ls_gamesvrhasLOCAL_DBG,LSWCandShip_EU/ID/NA/SA/SEA/TH/TW.ls_mainsvrhasLOCAL_DBGandShip_NA. Stick to Debug and Release. - Debug builds add a
Dto the file name (for examplels_gamesvrD.exe). - Release output split. Release builds of
FrameTimerDLLandiocpSocketDLLgo tobuild\Server\lib, but the servers link fromsrc\lib. Copy the new.libfiles intosrc\libafter rebuilding them. - ioFreeType writes only to its own
Bin\folder. Copy its.libintosrc\libby 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*keyon the command line instead of the packed format, with the port fixed at14009. - 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.
Client
Section titled “Client”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.iopandmap.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.dllandtownportal.dll. The other DLLs come from the source tree’slib\folder and from the DirectX June 2010 and VC++ 2010 redistributables.bdcap32.dll(in-game video recording) andflash9f.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.iopwas cleaned: 632 files thatrs.iopalso has (the client searchesrs.iopfirst, so those copies were never loaded) and 2 copies in a straytexture\folder were dropped. Every file the client could load before is still there with identical content.- There is no launcher. Start
lostsaga.exewith the launch argument from your own login server, or with the debug login described in Before You Start.info\autoupgrade_info.iniandinfo\start.inistill name the old Gemscool hosts.
Build test results
Section titled “Build test results”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).
What the fixes were
Section titled “What the fixes were”ls_loginsvrstopped withC1076/C3859(precompiled header heap limit). The project now passes/Zm300.- Client Release failed with
C2065: undeclared identifier: insrc\src\LSClient\Main.cppthe command-line variables (szKeyOnCmd,szOptionsOnCmd,szIPOnCmd,iPortOncmd) were only declared when_DIRECT_RUN_,LOCAL_DBGorSHIPPINGwas defined, and Release defines none of them. They are now declared wheneverLOCAL_DBGhas not declared them. LogDLLandFrameTimerDLLcopy their DLL intobuild\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.
Run it locally
Section titled “Run it locally”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.
Requirements
Section titled “Requirements”- The servers, built in Release|Win32 as above. Each server folder needs its exe plus
iocpSocketDLL.dll,frametimerdll.dll(frombuild\Server\lib),CrashFind.dll(fromsrc\lib) andmsvcr100.dll. - SQL Server (2022 Express works) with SQL authentication enabled.
- The 2014 client download, which already has the fixed
lostsaga.exeandiopac.dll(see Fixes in the client).
Database
Section titled “Database”-
Create
LosaGameandLosaLogDataand one SQL login that owns both. -
Run
lostsaga_tb.sql,lostsaga_sp.sqlandlostsaga_etc.sqlas described in Database. -
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.jsin the example set writes an empty procedure with the right parameters for eachls_query.inientry that is missing, once for each database. Those features then load and save nothing, but the calls no longer fail. -
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 accountstest1,test2andgmtest1. -
Run
db\losadev-features-from-2021.sql,db\losadev-first-tournament.sqlanddb\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.
Configs
Section titled “Configs”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.
Start order
Section titled “Start order”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.
Client launch
Section titled “Client launch”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 byEncode15(userID, secondKey), both as hex.Encode15is SEED in CFB mode (seels_gamesvr\Util\ioEncrypted.cpp), andsecondKeyis the newest row ofdefine_encode_key. - IP and port: one 64-bit number with the four IPv4 bytes in the low half and the game server’s
CSPORTin the high half. - The key is used up at logout, so write a new one before every start.
client\launch.txtin the example set has a worked example. - Windowed mode: put
SpecAutoCheck=0,Spec=4,FullScreen=0andUse16bitFrameBuffer=0under[Setting]inSave\<nickname>\setting.ini. The client only readsFullScreenwhenSpec=4(custom). - No window at all? If
info\pp.logshowsCreateDevice Failed(8876086c), checkSpec.Spec=3is the minimum preset: 16-bit full screen, which Windows 10 and 11 refuse. The client also savesSpec=3by itself after such a failure, so set it back to4.
Fixes in the client
Section titled “Fixes in the client”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()inLocal\ioLocalParent.cppno longer checks the date.iopac.dll: an old debug line inioPac\BigPac.cppshowed 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, becauseSetIcon()was called twice with the same image and the second call freed it. Fixed the way the 2019 and 2021 sources do it.
Known issues
Section titled “Known issues”- 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 FIELDSforgame_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 untiluserClassDBhas rows. ls_mainsvrshows a message box if the PC’s IP addresses do not fitPrivateIPFirstByte. Run it visibly the first time.
Known gaps
Section titled “Known gaps”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.
Placeholders in the repository
Section titled “Placeholders in the repository”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 is192.0.2.1(reserved, never matches). - Publisher, operator and game-service host names (Nexon, Gemscool, Z8Games, Garena, PlayPark, Valofe, OGPlanet, Daum, the old
lostsaga.comweb, patch and CDN hosts and others) are gone: URLs start withhttp://127.0.0.1/and keep their path, bare host names areexample.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 forbxIPGClient, 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.
Good first tasks
Section titled “Good first tasks”- Separate the community server’s own changes in
server-config\from the default values. - Retarget
ioPacandPatchManagerto the v100 toolset with aWin32platform, like the other projects.
