Skip to content

2019 Source (213 heroes)

Access: Public, Contributor, Core

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

Heroes 213
Visual Studio 2010 (toolset v100), Win32
Database scripts Yes: base scripts from 2012 plus feature patches from 2017 to 2019
Server config files Only server-config\ls_gamesvr\config\: shop and gacha configs that match the client
ls_query.ini Not included (the example set has one)
Client Separate download: Gemscool Indonesia client (2019), modified, see Client
Folder What is in it
win\ All solutions, with server and library projects in win\projects\
src\ Source code: servers, client, engine, launcher (LSAutoUpgrade), LSWebBroker, tools
lib\ Prebuilt libraries and DLLs. lib\lib_Shipping\ holds the Shipping engine build.
extra\ About 30 small tools, plus extra\lib (libcurl, OpenSSL, LS_NXSoap, LS_RestAPI) used by the billing server
etc\Library\ Bandi video and OggVorbis SDKs used by the client
sql\20120504\ Base database scripts
DB\ Dated feature patches from 2017 to 2019
  1. Create the database LosaGame. The servers also use a log database (LosaLogData); check which scripts create its tables before you rely on it.

  2. Run the base scripts from sql\20120504\ in this order: lostsaga_tb.sql (tables), lostsaga_sp.sql (stored procedures), lostsaga_etc.sql. They are the same files as in the 2014 source.

  3. Apply the feature patches in DB\, one folder at a time in date order. Inside each folder, run the table scripts first (userGameDB.sql, user*DB*.sql), then the procedures (game_*.sql). Alphabetical order runs the procedures first, and they fail because their tables and columns do not exist yet.

Tested on SQL Server 2022 with a fresh database:

  • Base scripts: all 62 tables, and 538 of 560 stored procedures. 22 procedures fail with “Invalid column name” because they expect newer table columns. One view fails because it needs LosaGame_log.
  • Patches: “Cannot drop … does not exist” messages on a fresh database are harmless. That is the DROP before the CREATE.
  • game_practice_rank_Reward_Cursor.sql has a syntax error and needs fixing.
  • CREATE USER fails until the lstggame and lstgweb logins exist.
  • Partly retargeted projects. iocpSocketDLL, ioPac and LSAutoUpgrade were set to Windows SDK 10.0 at some point. If Visual Studio 2010 complains, set them back to the default SDK.
  • Client Debug sheet. src\LSClient\DebugSheet.props copies the client to C:\LosaMyDev and expects files in C:\Bonus\lib\. Create those folders or edit the property sheet.
  • Fixed output folders. Some Debug builds write to D:\LostSaga\Korea\Server\... or D:\Work\trunk\build\.... Change the Output Directory if you do not have those drives or folders.
  • Server output goes to build\zone_dev\<server>\ (Debug) or build\zone_dist\<server>\ (Release), one level above the repository. The game server’s post-build step also writes ls_gamesvr1.exe and ls_gamesvr2.exe copies for running several game servers.
  • Older server generation. MainServer, SP2GameServer, DBAgentServer and BillingRelayServer are an older version of the same servers. Use the ls_* servers.
  • LSClientMT and io3DEngineMT are parallel variants that no solution uses. Their purpose is not known yet.

The client for this release is a modified Gemscool Indonesia client from 2019 (about 1.4 GB), shared as a separate download, not in Git. The source tree itself looks like a Korean build, so expect differences in protocol or text between the two until someone checks them.

  • Game data is packed in rs.iop and map.iop.

  • The programs are rebuilt from this source (Release): lostsaga.exe, io3dengine.dll, iofreetype.dll, lslog.dll, townportal.dll and iopac.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, web broker and patcher files, the uninstaller, crash dumper, shortcuts and DLLs the rebuilt programs do not use, plus personal files (saved login, logs, patch cache).

  • The packs were cleaned without losing anything the client can load:

    Pack Dropped
    rs.iop 299 older copies of files that a later copy in the same pack replaces
    map.iop 887 older copies, 9 910 files that rs.iop also has (searched first, so never loaded), 803 misplaced copies in texture\ and resource\text\ that exist byte for byte in the normal folders

    16 files in map.iop’s texture\ folder and one effect file in resource\text\ were kept because they differ from the copies in the normal folders. The client does not load from those paths.

  • The original lostsaga.pdb matches the original lostsaga.exe only, so it does not help with the rebuilt one.

  • There is no launcher. Start lostsaga.exe with the launch argument from your own login server, or with the debug login in Before You Start. This Release build is not a shipping build: the 3rd character of the options field must be 1 so it reads rs.iop and map.iop. 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 Version.h fix and static-runtime Boost:

Solution Result
ioINILoader, Log, LogDLL, FrameTimerDLL, iocpSocketDLL, LSLog, SharedContainer, PerfMon, TownPortal, ioFreeType Build
io3DEngine Builds
ls_dbagent, ls_mainsvr, ls_billingsvr, ls_gamesvr, ls_relaysvr, ls_loginsvr, ls_filewritesvr Build
LSClient Builds LostSaga.exe in src\LSClient\Release\ (about 5 minutes)
ioPac Builds (with the BigPac fix below)

Release output folders differ per server: ls_dbagent, ls_loginsvr and ls_filewritesvr go to build\zone_dev\, the others to build\zone_dist\.

  • ls_relaysvr failed with C2661: Manager.cpp called UDPNode::InitMemory with 5 arguments, but iocpSocketDLL (source and prebuilt library) only has 3- and 7-argument versions, and no other version exists anywhere in the tree. The 2014 relay server has the same line with the last two arguments commented out, so the repository now does the same: InitMemory(3000,16384*2,6000/*,6000,1000*/).
  • 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.
  • ioFreeType linked ../LSLog/bin/LSLog.lib, a folder this release does not have (LSLog builds into lib\). src\ioFreeType\StdAfx.h now points at ../../lib/.
  • ioPac did not compile: BigPac.cpp is newer than BigPac.h (the header is the 2014 one) and uses members and functions the header does not declare. BigPac.h now declares them, and OpenBigPacAll (IOP Manager only) is wrapped in #ifdef STATIC_PAC_API like the function it calls. The rebuilt iopac.dll exports everything the original did.

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 and Adbill 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.

Tested on 2026-11-07 on one Windows PC: all nine servers start and the client logs in to the lobby. Buying and full matches are not tested yet.

  1. Database. Use the 2021 release’s full scripts (LosaGame.sql, LosaGame_Log.sql, LosaLogData.sql), not this release’s own. The 2019 scripts are a 2012 base with a few patches, and 212 of the 401 stored procedures the 2019 server calls are missing there; login fails at game_member_count. The 2021 schema matches all but 8. Then run db\losadev-2019-procs.sql from the ZIP (adds game_member_count, game_member_add, game_create_nickname, game_pingpong, and the Indonesia version of game_game_get_data) and insert one row into define_encode_key (any 15 digits).

  2. Build the servers (Release|Win32). The community repository already has the four source fixes below.

  3. Configs. Unpack the ZIP’s server-config\, copy each .exe plus iocpSocketDLL.dll, frametimerdll.dll, CrashFind.dll (and GAuthClientDLL.dll for billing) from lib\ into its folder. Gameplay tables: ls_gamesvr\config\ and ls_mainsvr\config\ from the 2021 config set, GoodsList.ini/GoodsName.ini from src\ls_billingsvr\config\ (the 2021 ones stop the billing server).

  4. Start in this order, each from its own folder: the three DB agents, main, billing, game, relay, login, file write server.

  5. Client. Start lostsaga.exe with the launch line below.

  • Locale Indonesia. The 2019 client is the Gemscool Indonesia client and its packs only open with the Indonesia pack password, so the client runs the Indonesia locale and the servers must too: [Local] Version=938400398 in ls_config_game.ini and ls_config_billingsvr.ini. A mismatch gives CONNECT_WRONG_LOCAL_VER.
  • Local login. ls_billingsvr.ini [Test] TestMode=1: the billing server accepts every ID without asking the publisher and gives a test cash balance. Passwords are not checked.
  • IDs are 6 to 12 characters (letters, digits, -, _), an Indonesia rule. A new ID creates its account on the first login; the client then asks for a nickname.
  • GM: put the account’s nickname in ls_gamesvr\config\sp2_developerID.ini under [ID].
  • [SECURITY] ON=1 in ls_config_game.ini: the client always sends checksummed, encoded packets.
  • ls_query.ini: the 2021 map with ids 164 and 1016 taken from the 2014 map. Ids 300, 2093 and 2094 have no known procedure.
  • Dice event table. The game server stops at start without config\tables\LSC_SnakeLadders_Move.dat and LSC_SnakeLadders_Reward.dat. The move table is in the 2019 client’s map.iop (resource/tables/). No released reward table has the version this server expects (0x3baf8); a 20-byte file with that version and no rows works (dice event without rewards).
  • Addresses. The servers bind to the PC’s own IPv4 address (the first address its host name resolves to), not to 127.0.0.1 and not to a configured address. On a single PC, use that address in global_define.ini and the relay/login server lists, and let the client connect to it.

If you start from the original release, make these yourself:

File Change Why
src\ls_gamesvr\Local\ioLocalParent.cpp, src\LSClient\Local\ioLocalParent.cpp IsRightLicense() never expires The Indonesia license date (2013 server, 2012 client) has passed: the game server exits (“This program has expired”), the client shows “Your license has com up for renewal”.
src\ls_billingsvr\LoginManager\LoginManager.cpp In CheckLogin(), move the Indonesia TestMode success branch before the pInfo == NULL check Without the launcher’s earlier login nothing is in the login list, so every TestMode login failed.
src\ls_gamesvr\NodeInfo\UserNodeManager.cpp Skip the two __OHTG_LOGIN_IP_CHECK__ comparisons when no IP key was decrypted The Indonesia locale never decrypts an IP key, so the check always failed (USER IP NOT2).
src\ls_mainsvr\MainProcess.cpp Log “Local IP Error.” instead of a MessageBox A server running without a window must not wait on a dialog.
lostsaga.exe EDEW3940FVDP4950,10,20,30,1,autoupgrade_info.ini,300,0,1,938400398,?<ID>?00100000000000?0?<IP and port>
  • Do not put quotes around the argument. The client compares the raw command line with its check value and stops with App Cmd Error!.
  • The release build is compiled with NEXON_IP, so there are five ? fields; the 4th (IP key) is unused here.
  • The 10th comma field (938400398) is the locale, the 3rd options digit (1) makes the build read rs.iop and map.iop.
  • The last field packs the game server’s address: port × 4294967296 + a + b×256 + c×65536 + d×16777216 for a.b.c.d. Example: 192.168.0.10:19009 gives 19009 × 4294967296 + 192 + 168×256 + 0 + 10×16777216.
  • Practice mode and excavation are off: the server expects other versions of LSC_Practice.dat and LSC_Excavation_*.dat than the clients have.
  • game_spirit_get_data returns a different number of fields than the 2019 code reads.
  • Translate the Korean rows added to text_id.txt for this client.
  • Find or rebuild LSC_SnakeLadders_Reward.dat, LSC_Practice.dat and LSC_Excavation_*.dat in the versions this server expects.
  • Turn the four source fixes into a LOSADEV_LOCAL build option instead of plain edits.